This PR contains the following updates:
Release Notes
stripe/stripe-node (stripe)
Compare Source
- #2669 Add constructor based initialization for CJS based TypeScript imports
- Initialization of Stripe class with
new keyword 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_...');
- #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
Stripe constructor config parameter to use StripeConfig type instead of Record<string, unknown>, restoring compile-time type safety.
- Added missing
authenticator property to StripeConfig.
- Fixed
Stripe.API_VERSION to retain the literal API version type.
- Fixed
StripeConfig.stripeContext to accept StripeContext objects in addition to strings.
- #2663 Throw a more descriptive error when calling
rawRequest with absolute urls
- #2652 Added
string[] to WebhookHeader type for compatibility with express
- Added
string[] to the type of signature param in stripe.webhooks.construct_event method.
Compare Source
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 ⚠️ below. There's also a detailed migration guide to simplify your upgrade process.
- #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.StripeContext is no longer exported as a type. Use Stripe.StripeContextType instead.
- ⚠️
Stripe.errors.StripeError is no longer a type. Use typeof Stripe.errors.StripeError or Stripe.ErrorType instead.
- ⚠️ CJS entry point no longer exports .default or .Stripe as separate properties.
- ⚠️ Stripe import is now a true ES6 class. Use
new Stripe() to create a StripeClient instead of calling it:
// Before
const stripeClient = Stripe("sk_test_...");
// After
const stripeClient = new Stripe("sk_test_...");
-
#2645 ⚠️ Remove stripeMethod and 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. Use
async / await instead
- ⚠️ Remove support for passing a plain API key as a function arg. If supplied on a per-request basis, it should be in the
RequestOptions under the apiKey property
- ⚠️ Keys from
params and options objects are no longer mixed. If present on a method, RequestParams must always come first and RequestOptions must always come second. To supply options without params, pass undefined as the first argument explicitly
- ⚠️ Removed methods from
StripeResource: createFullPath, createResourcePathWithSymbols, extend, method and _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
})
If those look familiar, head over to the migration guide to update your code.
-
#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',
});
-
#2619 Improved TypeScript support in the Node SDK
-
#2638 Converted V2/Amount.ts to V2/V2Amount.ts
-
#2635 Updated stripe.spec.ts test and constructEvent.tolerance type
Compare Source
- #2626 Fix export for Stripe.Decimal in CJS and ESM. Resolves #2625
Compare Source
This release changes the pinned API version to 2026年03月25日.dahlia and contains breaking changes (prefixed with ⚠️ below). There's also a detailed migration guide to simplify your upgrade process.
Please review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.
Note: we're releasing another major version very soon that overhauls and improves the package's structure and typescript types. That will also use 2026年03月25日.dahlia as an API version and will mostly be a drop-in replacement.
- ⚠️ Breaking change: #2617 Add decimal_string support with vendored Decimal type
- All
decimal_string fields changed type from string to Stripe.Decimal in both request params and response objects. Code that reads or writes these fields as string will need to use Stripe.Decimal instead (construct via Decimal.from("1.23"), serialize via .toString()). Affected fields across v1 and v2 APIs:
- Checkout.Session:
currency_conversion.fx_rate
- Climate.Order:
metric_tons; Climate.Product: metric_tons_available
- CreditNoteLineItem:
unit_amount_decimal
- InvoiceItem:
quantity_decimal, unit_amount_decimal
- InvoiceLineItem:
quantity_decimal, unit_amount_decimal
- Issuing.Authorization / Issuing.Transaction (and TestHelpers):
quantity_decimal, unit_cost_decimal, gross_amount_decimal, local_amount_decimal, national_amount_decimal
- Plan:
amount_decimal, flat_amount_decimal, unit_amount_decimal
- Price:
unit_amount_decimal, flat_amount_decimal (including currency_options and tiers)
- V2.Core.Account / V2.Core.AccountPerson:
percent_ownership
- Request params on Invoice, Product, Quote, Subscription, SubscriptionItem, SubscriptionSchedule, PaymentLink:
unit_amount_decimal, flat_amount_decimal, quantity_decimal (where applicable)
- ⚠️ Breaking change: #2618 #2616 Throw an error when using the wrong webhook parsing method
- ⚠️ Breaking change: #2604 Add new OAuth Error classes
- ⚠️ Breaking change: #2609 Drop support for Node 16
- #2612 add manual amount type
- #2600 Add runtime support for V2 int64 string-encoded fields
⚠️ Breaking changes due to changes in the Stripe API
- Generated changes from #2611, #2620, #2618
- Add support for
upi_payments on Account.capabilities, AccountCreateParams.capabilities, and AccountUpdateParams.capabilities
- Add support for
upi on Charge.payment_method_details, Checkout.Session.payment_method_options, Checkout.SessionCreateParams.payment_method_options, ConfirmationToken.payment_method_preview, ConfirmationTokenCreateParams.testHelpers.payment_method_data, Mandate.payment_method_details, PaymentAttemptRecord.payment_method_details, PaymentIntent.payment_method_options, PaymentIntentConfirmParams.payment_method_data, PaymentIntentConfirmParams.payment_method_options, PaymentIntentCreateParams.payment_method_data, PaymentIntentCreateParams.payment_method_options, PaymentIntentUpdateParams.payment_method_data, PaymentIntentUpdateParams.payment_method_options, PaymentMethodConfigurationCreateParams, PaymentMethodConfigurationUpdateParams, PaymentMethodConfiguration, PaymentMethodCreateParams, PaymentMethod, PaymentRecord.payment_method_details, SetupAttempt.payment_method_details, SetupIntent.payment_method_options, SetupIntentConfirmParams.payment_method_data, SetupIntentConfirmParams.payment_method_options, SetupIntentCreateParams.payment_method_data, SetupIntentCreateParams.payment_method_options, SetupIntentUpdateParams.payment_method_data, and SetupIntentUpdateParams.payment_method_options
- Add support for new value
tempo on enums Charge.payment_method_details.crypto.network, PaymentAttemptRecord.payment_method_details.crypto.network, and PaymentRecord.payment_method_details.crypto.network
- Add support for
integration_identifier on Checkout.SessionCreateParams and Checkout.Session
- Add support for new value
upi on enums Checkout.SessionCreateParams.excluded_payment_method_types, PaymentIntent.excluded_payment_method_types, PaymentIntentConfirmParams.excluded_payment_method_types, PaymentIntentCreateParams.excluded_payment_method_types, PaymentIntentUpdateParams.excluded_payment_method_types, SetupIntent.excluded_payment_method_types, SetupIntentCreateParams.excluded_payment_method_types, and SetupIntentUpdateParams.excluded_payment_method_types
- Add support for
crypto on Checkout.SessionCreateParams.payment_method_options
- Add support for new value
upi on enum Checkout.SessionCreateParams.payment_method_types
- Add support for
pending_invoice_item_interval on Checkout.SessionCreateParams.subscription_data
- Add support for new values
elements, embedded_page, form, and hosted_page on enums Checkout.Session.ui_mode and Checkout.SessionCreateParams.ui_mode
- Add support for new value
marine_carbon_removal on enum Climate.Supplier.removal_pathway
- Add support for new value
upi on enums ConfirmationTokenCreateParams.testHelpers.payment_method_data.type, PaymentIntentConfirmParams.payment_method_data.type, PaymentIntentCreateParams.payment_method_data.type, PaymentIntentUpdateParams.payment_method_data.type, SetupIntentConfirmParams.payment_method_data.type, SetupIntentCreateParams.payment_method_data.type, and SetupIntentUpdateParams.payment_method_data.type
- Add support for new value
upi on enums ConfirmationToken.payment_method_preview.type and PaymentMethod.type
- Add support for
metadata on CreditNoteCreateParams.lines[], CreditNoteLineItem, CreditNotePreviewLinesParams.lines[], and CreditNotePreviewParams.lines[]
- Add support for new value
upi on enums CustomerListPaymentMethodsParams.type, PaymentMethodCreateParams.type, and PaymentMethodListParams.type
- Add support for
quantity_decimal on InvoiceAddLinesParams.lines[], InvoiceCreatePreviewParams.invoice_items[], InvoiceItemCreateParams, InvoiceItemUpdateParams, InvoiceItem, InvoiceLineItemUpdateParams, InvoiceLineItem, and InvoiceUpdateLinesParams.lines[]
- ⚠️ Add support for
level on Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_risk and Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_risk
- ⚠️ Remove support for
risk_level on Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_risk and Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_risk
- Add support for
lifecycle_controls on Issuing.CardCreateParams and Issuing.Card
- ⚠️ Change type of
Issuing.Token.network_data.visa.card_reference_id from string to string | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.brand and PaymentRecord.payment_method_details.card.brand from enum to enum | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.exp_month and PaymentRecord.payment_method_details.card.exp_month from longInteger to longInteger | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.exp_year and PaymentRecord.payment_method_details.card.exp_year from longInteger to longInteger | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.funding and PaymentRecord.payment_method_details.card.funding from enum('credit'|'debit'|'prepaid'|'unknown') to enum('credit'|'debit'|'prepaid'|'unknown') | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.last4 and PaymentRecord.payment_method_details.card.last4 from string to string | null
- ⚠️ Change type of
PaymentAttemptRecord.payment_method_details.card.moto and PaymentRecord.payment_method_details.card.moto from boolean to boolean | null
- Add support for
cryptogram, electronic_commerce_indicator, exemption_indicator_applied, and exemption_indicator on PaymentAttemptRecord.payment_method_details.card.three_d_secure and PaymentRecord.payment_method_details.card.three_d_secure
- Add support for
upi_handle_redirect_or_display_qr_code on PaymentIntent.next_action and SetupIntent.next_action
- Add support for new value
upi on enums PaymentLink.payment_method_types, PaymentLinkCreateParams.payment_method_types, and PaymentLinkUpdateParams.payment_method_types
- Add support for
recommended_action and signals on Radar.PaymentEvaluation
- ⚠️ Remove support for
insights on Radar.PaymentEvaluation
- Add support for new value
crypto_fingerprint on enums Radar.ValueList.item_type and Radar.ValueListCreateParams.item_type
- Add support for new value
canceled_by_retention_policy on enum Subscription.cancellation_details.reason
- Add support for new value
2026年03月25日.dahlia on enum WebhookEndpointCreateParams.api_version
- ⚠️ Change type of
V2.Core.EventDestination.events_from and V2.Core.EventDestinationCreateParams.events_from from enum('other_accounts'|'self') to string
- Add support for error code
service_period_coupon_with_metered_tiered_item_unsupported on Invoice.last_finalization_error, PaymentIntent.last_payment_error, SetupAttempt.setup_error, SetupIntent.last_setup_error, and StripeError
Configuration
📅 Schedule: (UTC)
- Branch creation
- Automerge
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Uh oh!
There was an error while loading. Please reload this page.
This PR contains the following updates:
^20.3.1→^22.0.0Release Notes
stripe/stripe-node (stripe)
v22.0.1Compare Source
newkeyword is now possible for CJS based TypeScript project. Resolves: 2660Stripeconstructor config parameter to useStripeConfigtype instead ofRecord<string, unknown>, restoring compile-time type safety.authenticatorproperty toStripeConfig.Stripe.API_VERSIONto retain the literal API version type.StripeConfig.stripeContextto acceptStripeContextobjects in addition to strings.rawRequestwith absolute urlsstring[]toWebhookHeadertype for compatibility with expressstring[]to the type ofsignatureparam instripe.webhooks.construct_eventmethod.v22.0.0Compare Source
This release uses the same pinned API version to⚠️ below. There's also a detailed migration guide to simplify your upgrade process.
2026年03月25日.dahliaas the last major release. The breaking changes in this release are prefixed withStripe.StripeContextis no longer exported as a type. UseStripe.StripeContextTypeinstead.Stripe.errors.StripeErroris no longer a type. Usetypeof Stripe.errors.StripeErrororStripe.ErrorTypeinstead.new Stripe()to create a StripeClient instead of calling it:#2645⚠️ Remove
stripeMethodand standardize how function args are handled (including removing callback support)async / awaitinsteadRequestOptionsunder theapiKeypropertyparamsandoptionsobjects 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 explicitlyStripeResource:createFullPath,createResourcePathWithSymbols,extend,methodand_joinUrlParts. These were mostly intended for internal use and we no longer need themAs a result, the following call patterns are no longer supported:
If those look familiar, head over to the migration guide to update your code.
#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:
After:
#2619 Improved TypeScript support in the Node SDK
#2638 Converted V2/Amount.ts to V2/V2Amount.ts
#2635 Updated stripe.spec.ts test and constructEvent.tolerance type
v21.0.1Compare Source
v21.0.0Compare Source
This release changes the pinned API version to⚠️ below). There's also a detailed migration guide to simplify your upgrade process.
2026年03月25日.dahliaand contains breaking changes (prefixed withPlease review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.
decimal_stringfields changed type fromstringtoStripe.Decimalin both request params and response objects. Code that reads or writes these fields asstringwill need to useStripe.Decimalinstead (construct viaDecimal.from("1.23"), serialize via.toString()). Affected fields across v1 and v2 APIs:currency_conversion.fx_ratemetric_tons; Climate.Product:metric_tons_availableunit_amount_decimalquantity_decimal,unit_amount_decimalquantity_decimal,unit_amount_decimalquantity_decimal,unit_cost_decimal,gross_amount_decimal,local_amount_decimal,national_amount_decimalamount_decimal,flat_amount_decimal,unit_amount_decimalunit_amount_decimal,flat_amount_decimal(includingcurrency_optionsandtiers)percent_ownershipunit_amount_decimal,flat_amount_decimal,quantity_decimal(where applicable)upi_paymentsonAccount.capabilities,AccountCreateParams.capabilities, andAccountUpdateParams.capabilitiesupionCharge.payment_method_details,Checkout.Session.payment_method_options,Checkout.SessionCreateParams.payment_method_options,ConfirmationToken.payment_method_preview,ConfirmationTokenCreateParams.testHelpers.payment_method_data,Mandate.payment_method_details,PaymentAttemptRecord.payment_method_details,PaymentIntent.payment_method_options,PaymentIntentConfirmParams.payment_method_data,PaymentIntentConfirmParams.payment_method_options,PaymentIntentCreateParams.payment_method_data,PaymentIntentCreateParams.payment_method_options,PaymentIntentUpdateParams.payment_method_data,PaymentIntentUpdateParams.payment_method_options,PaymentMethodConfigurationCreateParams,PaymentMethodConfigurationUpdateParams,PaymentMethodConfiguration,PaymentMethodCreateParams,PaymentMethod,PaymentRecord.payment_method_details,SetupAttempt.payment_method_details,SetupIntent.payment_method_options,SetupIntentConfirmParams.payment_method_data,SetupIntentConfirmParams.payment_method_options,SetupIntentCreateParams.payment_method_data,SetupIntentCreateParams.payment_method_options,SetupIntentUpdateParams.payment_method_data, andSetupIntentUpdateParams.payment_method_optionstempoon enumsCharge.payment_method_details.crypto.network,PaymentAttemptRecord.payment_method_details.crypto.network, andPaymentRecord.payment_method_details.crypto.networkintegration_identifieronCheckout.SessionCreateParamsandCheckout.Sessionupion enumsCheckout.SessionCreateParams.excluded_payment_method_types,PaymentIntent.excluded_payment_method_types,PaymentIntentConfirmParams.excluded_payment_method_types,PaymentIntentCreateParams.excluded_payment_method_types,PaymentIntentUpdateParams.excluded_payment_method_types,SetupIntent.excluded_payment_method_types,SetupIntentCreateParams.excluded_payment_method_types, andSetupIntentUpdateParams.excluded_payment_method_typescryptoonCheckout.SessionCreateParams.payment_method_optionsupion enumCheckout.SessionCreateParams.payment_method_typespending_invoice_item_intervalonCheckout.SessionCreateParams.subscription_dataelements,embedded_page,form, andhosted_pageon enumsCheckout.Session.ui_modeandCheckout.SessionCreateParams.ui_modemarine_carbon_removalon enumClimate.Supplier.removal_pathwayupion enumsConfirmationTokenCreateParams.testHelpers.payment_method_data.type,PaymentIntentConfirmParams.payment_method_data.type,PaymentIntentCreateParams.payment_method_data.type,PaymentIntentUpdateParams.payment_method_data.type,SetupIntentConfirmParams.payment_method_data.type,SetupIntentCreateParams.payment_method_data.type, andSetupIntentUpdateParams.payment_method_data.typeupion enumsConfirmationToken.payment_method_preview.typeandPaymentMethod.typemetadataonCreditNoteCreateParams.lines[],CreditNoteLineItem,CreditNotePreviewLinesParams.lines[], andCreditNotePreviewParams.lines[]upion enumsCustomerListPaymentMethodsParams.type,PaymentMethodCreateParams.type, andPaymentMethodListParams.typequantity_decimalonInvoiceAddLinesParams.lines[],InvoiceCreatePreviewParams.invoice_items[],InvoiceItemCreateParams,InvoiceItemUpdateParams,InvoiceItem,InvoiceLineItemUpdateParams,InvoiceLineItem, andInvoiceUpdateLinesParams.lines[]levelonIssuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_riskandIssuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_riskrisk_levelonIssuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_riskandIssuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_risklifecycle_controlsonIssuing.CardCreateParamsandIssuing.CardIssuing.Token.network_data.visa.card_reference_idfromstringtostring | nullPaymentAttemptRecord.payment_method_details.card.brandandPaymentRecord.payment_method_details.card.brandfromenumtoenum | nullPaymentAttemptRecord.payment_method_details.card.exp_monthandPaymentRecord.payment_method_details.card.exp_monthfromlongIntegertolongInteger | nullPaymentAttemptRecord.payment_method_details.card.exp_yearandPaymentRecord.payment_method_details.card.exp_yearfromlongIntegertolongInteger | nullPaymentAttemptRecord.payment_method_details.card.fundingandPaymentRecord.payment_method_details.card.fundingfromenum('credit'|'debit'|'prepaid'|'unknown')toenum('credit'|'debit'|'prepaid'|'unknown') | nullPaymentAttemptRecord.payment_method_details.card.last4andPaymentRecord.payment_method_details.card.last4fromstringtostring | nullPaymentAttemptRecord.payment_method_details.card.motoandPaymentRecord.payment_method_details.card.motofrombooleantoboolean | nullcryptogram,electronic_commerce_indicator,exemption_indicator_applied, andexemption_indicatoronPaymentAttemptRecord.payment_method_details.card.three_d_secureandPaymentRecord.payment_method_details.card.three_d_secureupi_handle_redirect_or_display_qr_codeonPaymentIntent.next_actionandSetupIntent.next_actionupion enumsPaymentLink.payment_method_types,PaymentLinkCreateParams.payment_method_types, andPaymentLinkUpdateParams.payment_method_typesrecommended_actionandsignalsonRadar.PaymentEvaluationinsightsonRadar.PaymentEvaluationcrypto_fingerprinton enumsRadar.ValueList.item_typeandRadar.ValueListCreateParams.item_typecanceled_by_retention_policyon enumSubscription.cancellation_details.reason2026年03月25日.dahliaon enumWebhookEndpointCreateParams.api_versionV2.Core.EventDestination.events_fromandV2.Core.EventDestinationCreateParams.events_fromfromenum('other_accounts'|'self')tostringservice_period_coupon_with_metered_tiered_item_unsupportedonInvoice.last_finalization_error,PaymentIntent.last_payment_error,SetupAttempt.setup_error,SetupIntent.last_setup_error, andStripeErrorConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.