Releases: stripe/stripe-node
v22.1.0-beta.3
Please review the changelog for 22.0.2 for more information about changes in this release.
v22.0.2
- #2685 Adds
parseEventNotificationAsyncto match existing sync function - #2681 Add emitEventBodies config to include bodies in request/response events
- Added
emitEventBodiesconfig option to include request and response bodies inrequest/responseevents. - Changed
httpClientconfig type fromHttpClientclass toHttpClientInterfaceinterface.
- Added
- #2670 tolerance, receivedAt, timestamp are now optional in Webhook.ts
- #2677 Fixed named export for Bun
// ✅ Fixed import { Stripe } from 'stripe';
v22.1.0-alpha.3
- #2686 Update generated code for private-preview
- Add support for
latest_versiononV2.Billing.LicenseFee,V2.Billing.PricingPlan, andV2.Billing.RateCard - Add support for
service_interval_countandservice_intervalonV2.Billing.LicenseFeeandV2.Billing.RateCard
- Add support for
- #2682 Update generated code for private-preview
- Add support for new resources
V2.Core.WorkflowRunandV2.Core.Workflow - Add support for
report_authorizedmethod on resourcePaymentAttemptRecord - Add support for
listandretrievemethods on resourceV2.Core.WorkflowRun - Add support for
invoke,list, andretrievemethods on resourceV2.Core.Workflow - Add support for
next_actionandstatusonSharedPayment.IssuedToken ⚠️ Remove support fornetwork_idonSharedPayment.IssuedToken.seller_details- Add support for
billsonAccountSession.components - Add support for
settlement_currenciesonBalanceSettingUpdateParams.paymentsandBalanceSettings.payments - Add support for
default_settlement_currencyonBalanceSettings.payments - Add support for
account_fundingonCharge.payment_method_details.card - Add support for
automatic_surchargeonCheckout.SessionCreateParams,Checkout.Session,PaymentLinkCreateParams, andPaymentLink - Add support for
bizumonCheckout.Session.payment_method_optionsandCheckout.SessionCreateParams.payment_method_options - Add support for
surcharge_costonCheckout.Session - Add support for
amount_surchargeonCheckout.Session.total_details - Add support for
shared_payment_granted_tokenonConfirmationTokenCreateParams.testHelpers.payment_method_data,PaymentIntentConfirmParams.payment_method_data,PaymentIntentCreateParams.payment_method_data,PaymentIntentUpdateParams.payment_method_data,SetupIntentConfirmParams.payment_method_data,SetupIntentCreateParams.payment_method_data, andSetupIntentUpdateParams.payment_method_data - Add support for new value
emailon enumsIdentity.VerificationReportListParams.type,Identity.VerificationSessionCreateParams.type, andIdentity.VerificationSessionUpdateParams.type - Add support for
detailsonIdentity.VerificationReport.email ⚠️ Add support for new valueemailon enumsIdentity.VerificationReport.typeandIdentity.VerificationSession.type- Add support for
confirmonIdentity.VerificationSessionCreateParamsandIdentity.VerificationSessionUpdateParams - Add support for
subscriptiononInvoiceItem.parent.schedule_details ⚠️ Remove support forshared_payment_granted_tokenonPaymentIntentConfirmParamsandPaymentIntentCreateParams- Add support for
money_servicesonPaymentIntent.payment_details ⚠️ Remove support forexternal_referenceonPlan- Change
SharedPayment.GrantedToken.payment_method_details.billing_detailsto be required
- Add support for new resources
v22.1.0-beta.2
Please review the changelog for 22.0.1 for more information about changes in this release.
v22.1.0-alpha.2
- #2657 Update generated code for private-preview
- Add support for
payment_recordonApplicationFee.fee_source - Add support for
beneficiary_account,beneficiary_details,sender_account, andsender_detailsonChargeCaptureParams.payment_details.money_services.account_funding,ChargeUpdateParams.payment_details.money_services.account_funding,PaymentIntentCaptureParams.payment_details.money_services.account_funding,PaymentIntentConfirmParams.payment_details.money_services.account_funding,PaymentIntentCreateParams.payment_details.money_services.account_funding, andPaymentIntentUpdateParams.payment_details.money_services.account_funding - Change type of
ChargeCaptureParams.payment_details.money_services.transaction_type,ChargeUpdateParams.payment_details.money_services.transaction_type,PaymentIntentCaptureParams.payment_details.money_services.transaction_type,PaymentIntentConfirmParams.payment_details.money_services.transaction_type,PaymentIntentCreateParams.payment_details.money_services.transaction_type, andPaymentIntentUpdateParams.payment_details.money_services.transaction_typefromliteral('account_funding')toemptyable(literal('account_funding')) - Add support for
bizumonInvoice.payment_settings.payment_method_options,InvoiceCreateParams.payment_settings.payment_method_options,InvoiceUpdateParams.payment_settings.payment_method_options,QuotePreviewInvoice.payment_settings.payment_method_options,Subscription.payment_settings.payment_method_options,SubscriptionCreateParams.payment_settings.payment_method_options, andSubscriptionUpdateParams.payment_settings.payment_method_options ⚠️ Add support for new valuebizumon enumsInvoice.payment_settings.payment_method_types,InvoiceCreateParams.payment_settings.payment_method_types,InvoiceUpdateParams.payment_settings.payment_method_types,QuotePreviewInvoice.payment_settings.payment_method_types,Subscription.payment_settings.payment_method_types,SubscriptionCreateParams.payment_settings.payment_method_types, andSubscriptionUpdateParams.payment_settings.payment_method_types- Add support for
quantity_precisiononPaymentIntentAmountDetailsLineItem,PaymentIntentCaptureParams.amount_details.line_items[],PaymentIntentConfirmParams.amount_details.line_items[],PaymentIntentCreateParams.amount_details.line_items[],PaymentIntentDecrementAuthorizationParams.amount_details.line_items[],PaymentIntentIncrementAuthorizationParams.amount_details.line_items[], andPaymentIntentUpdateParams.amount_details.line_items[] - Add support for
liquid_assetandwalletonPaymentIntentConfirmParams.payment_method_options.card.payment_details.money_services.account_funding,PaymentIntentConfirmParams.payment_method_options.card_present.payment_details.money_services.account_funding,PaymentIntentCreateParams.payment_method_options.card.payment_details.money_services.account_funding,PaymentIntentCreateParams.payment_method_options.card_present.payment_details.money_services.account_funding,PaymentIntentUpdateParams.payment_method_options.card.payment_details.money_services.account_funding, andPaymentIntentUpdateParams.payment_method_options.card_present.payment_details.money_services.account_funding - Add support for
shared_payment_granted_tokenonPaymentMethod ⚠️ Change type ofRadar.CustomerEvaluation.event_typefromstringtoenum('login'|'registration')⚠️ Change type ofRadar.CustomerEvaluation.signals.account_sharing.risk_levelandRadar.CustomerEvaluation.signals.multi_accounting.risk_levelfromstringtoenum- Add support for
dataonRadar.PaymentEvaluation.client_device_metadata_detailsandRadar.PaymentEvaluationCreateParams.client_device_metadata_details - Add support for
sunbitonSharedPayment.GrantedToken.payment_method_details ⚠️ Add support for new valuesunbiton enumSharedPayment.GrantedToken.payment_method_details.type⚠️ Remove support for valuesbm_crn,bo_tin,bt_tpn,co_nit,ec_ruc,eg_tin,gh_tin,gy_tin,hn_rtn,jm_trn,jo_crn,ke_pin,ky_crn,lk_tin,mo_tin,mv_tin,ng_tin,pa_ruc,ph_tin,py_ruc,sl_tin,sv_nit,uy_ruc,vg_cn, andza_tinfrom enumsV2.Core.Account.identity.business_details.id_numbers[].type,V2.Core.AccountCreateParams.identity.business_details.id_numbers[].type,V2.Core.AccountTokenCreateParams.identity.business_details.id_numbers[].type, andV2.Core.AccountUpdateParams.identity.business_details.id_numbers[].type⚠️ Remove support for valuesbm_pp,bo_ci,bt_cid,eg_tin,gh_pin,gy_tin,hn_rtn,jm_trn,jo_pin,ky_pp,lk_nic,mo_bir,mt_nic,mv_tin,pa_ruc,ph_tin,py_ruc,si_pin,sv_nit, andvg_ppfrom enumsV2.Core.Account.identity.individual.id_numbers[].type,V2.Core.AccountCreateParams.identity.individual.id_numbers[].type,V2.Core.AccountPerson.id_numbers[].type,V2.Core.AccountPersonCreateParams.id_numbers[].type,V2.Core.AccountPersonTokenCreateParams.id_numbers[].type,V2.Core.AccountPersonUpdateParams.id_numbers[].type,V2.Core.AccountTokenCreateParams.identity.individual.id_numbers[].type, andV2.Core.AccountUpdateParams.identity.individual.id_numbers[].type- Add support for error type
CannotProceedError
- Add support for
v22.0.1
- #2669 Add constructor based initialization for CJS based TypeScript imports
- Initialization of Stripe class with
newkeyword is now possible for CJS based TypeScript project. Resolves: 2660
import Stripe = require('stripe'); // ✅ Both statements work const stripeNew: Stripe.Stripe = new Stripe('sk_test_...'); const stripeCalled: Stripe.Stripe = Stripe('sk_test_...');
- Initialization of Stripe class with
- #2664 Fixed nested service param exports in the Stripe namespace
- #2667 Add type safety to Stripe constructor config (no runtime change)
- Fixed some compile-time checks (no runtime changes)
- Fixed
Stripeconstructor config parameter to useStripeConfigtype instead ofRecord<string, unknown>, restoring compile-time type safety. - Added missing
authenticatorproperty toStripeConfig. - Fixed
Stripe.API_VERSIONto retain the literal API version type. - Fixed
StripeConfig.stripeContextto acceptStripeContextobjects in addition to strings.
- Fixed
- Fixed some compile-time checks (no runtime changes)
- #2663 Throw a more descriptive error when calling
rawRequestwith absolute urls - #2652 Added
string[]toWebhookHeadertype for compatibility with express- Added
string[]to the type ofsignatureparam instripe.webhooks.construct_eventmethod.
- Added
v22.1.0-beta.1
Please review the changelog for 22.0.0 for more information about changes in this release.
v22.1.0-alpha.1
This release changes the pinned API version to 2026-04-01.preview and contains additional breaking changes. See the GA changelog for more information.
- #2629 Update generated code for private-preview
- Add support for new resources
SharedPayment.IssuedTokenandV2.Data.Reporting.QueryRun - Add support for
createandretrievemethods on resourceV2.Data.Reporting.QueryRun - Add support for
pauseandresumemethods on resourceV2.Payments.OffSessionPayment - Add support for
tenant_keys,tenant_operator, andtenant_valuesonBilling.MeterListMeterEventSummariesParams - Add support for
fleet_dataonChargeCaptureParams.payment_details,ChargeUpdateParams.payment_details,PaymentIntent.payment_details,PaymentIntentAmountDetailsLineItem.payment_method_options.card,PaymentIntentCaptureParams.amount_details.line_items[].payment_method_options.card,PaymentIntentCaptureParams.payment_details,PaymentIntentConfirmParams.amount_details.line_items[].payment_method_options.card,PaymentIntentConfirmParams.payment_details,PaymentIntentCreateParams.amount_details.line_items[].payment_method_options.card,PaymentIntentCreateParams.payment_details,PaymentIntentDecrementAuthorizationParams.amount_details.line_items[].payment_method_options.card,PaymentIntentIncrementAuthorizationParams.amount_details.line_items[].payment_method_options.card,PaymentIntentUpdateParams.amount_details.line_items[].payment_method_options.card, andPaymentIntentUpdateParams.payment_details - Add support for
money_servicesonChargeCaptureParams.payment_details,ChargeUpdateParams.payment_details,PaymentIntentCaptureParams.payment_details,PaymentIntentConfirmParams.payment_details,PaymentIntentCreateParams.payment_details, andPaymentIntentUpdateParams.payment_details - Add support for
payment_method_optionsonDelegatedCheckout.RequestedSessionCreateParams,DelegatedCheckout.RequestedSessionUpdateParams, andDelegatedCheckout.RequestedSession ⚠️ Remove support forpayment_method_dataonDelegatedCheckout.RequestedSessionConfirmParams,DelegatedCheckout.RequestedSessionCreateParams, andDelegatedCheckout.RequestedSessionUpdateParams- Add support for
card_brandsandpayment_method_typesonDelegatedCheckout.RequestedSession.seller_details ⚠️ Change type ofDelegatedCheckout.RequestedSession.shared_payment_issued_tokenfromstringtoexpandable(SharedPayment.IssuedToken)⚠️ Add support for new valuerequires_actionon enumDelegatedCheckout.RequestedSession.status- Add support for
check_scanonInvoice.payment_settings.payment_method_options,InvoiceCreateParams.payment_settings.payment_method_options,InvoiceUpdateParams.payment_settings.payment_method_options,QuotePreviewInvoice.payment_settings.payment_method_options,Subscription.payment_settings.payment_method_options,SubscriptionCreateParams.payment_settings.payment_method_options, andSubscriptionUpdateParams.payment_settings.payment_method_options ⚠️ Add support for new valuecheck_scanon enumsInvoice.payment_settings.payment_method_types,InvoiceCreateParams.payment_settings.payment_method_types,InvoiceUpdateParams.payment_settings.payment_method_types,QuotePreviewInvoice.payment_settings.payment_method_types,Subscription.payment_settings.payment_method_types,SubscriptionCreateParams.payment_settings.payment_method_types, andSubscriptionUpdateParams.payment_settings.payment_method_types- Add support for
processor_detailsonPaymentAttemptRecordReportFailedParams,PaymentAttemptRecordReportGuaranteedParams,PaymentRecordReportPaymentAttemptFailedParams,PaymentRecordReportPaymentAttemptGuaranteedParams,PaymentRecordReportPaymentAttemptParams.failed,PaymentRecordReportPaymentAttemptParams.guaranteed,PaymentRecordReportPaymentParams.failed, andPaymentRecordReportPaymentParams.guaranteed - Add support for
payment_detailsonPaymentIntentConfirmParams.payment_method_options.card_present,PaymentIntentConfirmParams.payment_method_options.card,PaymentIntentCreateParams.payment_method_options.card_present,PaymentIntentCreateParams.payment_method_options.card,PaymentIntentUpdateParams.payment_method_options.card_present, andPaymentIntentUpdateParams.payment_method_options.card ⚠️ Remove support forbill_fromonQuotePreviewSubscriptionSchedule.billing_schedules[],Subscription.billing_schedules[], andSubscriptionSchedule.billing_schedules[]- Add support for
agent_details,payment_method_details, andrisk_detailsonSharedPayment.GrantedToken - Add support for
paper_checksonV2.Account.configuration.recipient_data.features,V2.AccountCreateParams.configuration.recipient_data.features,V2.AccountUpdateParams.configuration.recipient_data.features,V2.Core.Account.configuration.recipient.capabilities,V2.Core.Account.configuration.storer.capabilities.outbound_payments,V2.Core.AccountCreateParams.configuration.recipient.capabilities,V2.Core.AccountCreateParams.configuration.storer.capabilities.outbound_payments,V2.Core.AccountUpdateParams.configuration.recipient.capabilities, andV2.Core.AccountUpdateParams.configuration.storer.capabilities.outbound_payments ⚠️ Add support for new valuepaper_checkson enumV2.Account.configuration.supportable_features.recipient_data⚠️ Add support for new valuepaper_checkson enumV2.Account.requirements[].impact.required_for_features⚠️ Change type ofV2.Billing.Cadence.settings_data.collection.payment_method_options.konbini,V2.Billing.CollectionSetting.payment_method_options.konbini,V2.Billing.CollectionSettingCreateParams.payment_method_options.konbini,V2.Billing.CollectionSettingUpdateParams.payment_method_options.konbini, andV2.Billing.CollectionSettingVersion.payment_method_options.konbinifrommap(string: dynamic)toan object⚠️ Change type ofV2.Billing.Cadence.settings_data.collection.payment_method_options.sepa_debit,V2.Billing.CollectionSetting.payment_method_options.sepa_debit,V2.Billing.CollectionSettingCreateParams.payment_method_options.sepa_debit,V2.Billing.CollectionSettingUpdateParams.payment_method_options.sepa_debit, andV2.Billing.CollectionSettingVersion.payment_method_options.sepa_debitfrommap(string: dynamic)toan object- Add support for
idonV2.Billing.CadenceSpendModifier.max_billing_period_spend.amount.custom_pricing_unit,V2.Billing.IntentAction.apply.spend_modifier_rule.max_billing_period_spend.amount.custom_pricing_unit, andV2.Billing.IntentCreateParams.actions[].apply.spend_modifier_rule.max_billing_period_spend.amount.custom_pricing_unit ⚠️ Add support for new valuesoutbound_payments.paper_checksandpaper_checkson enumsV2.Core.Account.future_requirements.entries[].impact.restricts_capabilities[].capabilityandV2.Core.Account.requirements.entries[].impact.restricts_capabilities[].capability⚠️ Add support for new valuesbm_crn,bo_tin,bt_tpn,co_nit,ec_ruc,eg_tin,gh_tin,gy_tin,hn_rtn,jm_trn,jo_crn,ke_pin,ky_crn,lk_tin,mo_tin,mv_tin,ng_tin,pa_ruc,ph_tin,py_ruc,sl_tin,sv_nit,uy_ruc,vg_cn, andza_tinon enumsV2.Core.Account.identity.business_details.id_numbers[].type,V2.Core.AccountCreateParams.identity.business_details.id_numbers[].type,V2.Core.AccountTokenCreateParams.identity.business_details.id_numbers[].type, andV2.Core.AccountUpdateParams.identity.business_details.id_numbers[].type⚠️ Add support for new valuesbm_pp,bo_ci,bt_cid,eg_tin,gh_pin,gy_tin,hn_rtn,jm_trn,jo_pin,ky_pp,lk_nic,mo_bir,mt_nic,mv_tin,pa_ruc,ph_tin,py_ruc,si_pin,sv_nit, andvg_ppon enumsV2.Core.Account.identity.individual.id_numbers[].type,V2.Core.AccountCreateParams.identity.individual.id_numbers[].type,V2.Core.AccountPerson.id_numbers[].type,V2.Core.AccountPersonCreateParams.id_numbers[].type,V2.Core.AccountPersonTokenCreateParams.id_numbers[].type,V2.Core.AccountPersonUpdateParams.id_numbers[].type,V2.Core.AccountTokenCreateParams.identity.individual.id_numbers[].type, andV2.Core.AccountUpdateParams.identity.individual.id_numbers[].type⚠️ Change type ofV2.Core.Event.reason.request.client.stripe_actionfrommap(string: dynamic)toan object⚠️ Change type ofV2.MoneyManagement.InboundTransfer.transfer_history[].bank_debit_processingfrommap(string: dynamic)toan object⚠️ Change type ofV2.MoneyManagement.InboundTransfer.transfer_history[].bank_debit_queuedfrommap(string: dynamic)toan object⚠️ Change type ofV2.MoneyManagement.InboundTransfer.transfer_history[].bank_debit_succeededfrommap(string: dynamic)toan object⚠️ Add support for new valuespaper_check_attachment_too_large,paper_check_expired, andpaper_check_undeliverableon enumV2.MoneyManagement.OutboundPayment.status_details.failed.reason⚠️ Remove support fortownonV2.MoneyManagement.OutboundPayment.tracking_details.paper_check.mailing_address- Change
V2.MoneyManagement.OutboundPayment.delivery_options.paper_check.memoto be required ⚠️ Add support for new valuepayout_method_amount_limit_exceededon enumV2.MoneyManagement.OutboundTransfer.status_details.failed.reason- Add support for
application_fee_amount_requestedonV2.Payments.OffSessionPayment ⚠️ Remove support forcompartment_idonV2.Payments.OffSessionPayment⚠️ Add support for new valueexceeded_retry_windowon enumV2.Payments.OffSessionPayment.failure_reason- Add support for
retry_untilonV2.Payments.OffSessionPayment.retry_details ⚠️ Add support ...
- Add support for new resources
v22.0.0
This release uses the same pinned API version to 2026-03-25.dahlia as the last major release. The breaking changes in this release are prefixed with
- #2619 Improved TypeScript support in the Node SDK
- Moved the types from the partially manually maintained and partially generated types folder to be inline with the implementation in TypeScript files.
- Removed top-level “stripe” ambient module. This allows import aliasing for the stripe package.
⚠️ Stripe.StripeContextis no longer exported as a type. UseStripe.StripeContextTypeinstead.⚠️ Stripe.errors.StripeErroris no longer a type. Usetypeof Stripe.errors.StripeErrororStripe.ErrorTypeinstead.⚠️ CJS entry point no longer exports .default or .Stripe as separate properties.⚠️ Stripe import is now a true ES6 class. Usenew Stripe()to create a StripeClient instead of calling it:
// Before
const stripeClient = Stripe("sk_test_...");
// After
const stripeClient = new Stripe("sk_test_...");-
#2645
⚠️ RemovestripeMethodand standardize how function args are handled (including removing callback support)⚠️ Refactor how incoming method arguments are parsed. Type signatures for API methods should be much more accurate and reliable now⚠️ Remove support for providing callbacks to API methods. Useasync / awaitinstead⚠️ Remove support for passing a plain API key as a function arg. If supplied on a per-request basis, it should be in theRequestOptionsunder theapiKeyproperty⚠️ Keys fromparamsandoptionsobjects are no longer mixed. If present on a method,RequestParamsmust always come first andRequestOptionsmust always come second. To supply options without params, passundefinedas the first argument explicitly⚠️ Removed methods fromStripeResource:createFullPath,createResourcePathWithSymbols,extend,methodand_joinUrlParts. These were mostly intended for internal use and we no longer need them
As a result, the following call patterns are no longer supported:
stripe.customers.retrieve('cus_123', 'sk_test_123') stripe.customers.create({name: 'david', host: 'example.com'}, 'sk_test_123') stripe.customers.create({apiKey: 'sk_test_123'}) stripe.customers.list(customers => { // do something with customers })
-
#2643
⚠️ Removed per-request host override. To use a custom host, set it in the client configuration. All requests from that client will use that host.Before:
import Stripe from 'stripe'; const stripe = new Stripe('sk_test_...'); const customer = await stripe.customers.create({ email: 'customer@example.com', }, {host: 'example.com'});
After:
import Stripe from 'stripe'; const stripe = new Stripe('sk_test_...', {host: 'example.com'}); // goes to example.com const customer = await stripe.customers.create({ email: 'customer@example.com', });
-
#2638 Converted V2/Amount.ts to V2/V2Amount.ts