This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| stripe | ^21.0.1 → ^22.1.1 |
Release Notes
stripe/stripe-node (stripe)
v22.1.1
#2703 Export Decimal type from Stripe namespace
- Added
Stripe.Decimalas a usable type in theStripenamespace, enabling type annotations likefunction takesDecimal(d: Stripe.Decimal).
- Added
#2704 Fix file upload regression: restore multipart request data processor
- Fixed file uploads failing with
StripeInvalidRequestErroron the/v1/filesendpoint since v22.
- Fixed file uploads failing with
v22.1.0
This release changes the pinned API version to 2026-04-22.dahlia.
- #2639 Update generated code
- Add support for
app_distributionandsunbit_paymentsonAccount.capabilities,AccountCreateParams.capabilities, andAccountUpdateParams.capabilities - Add support for
balance_reportandpayout_reconciliation_reportonAccountSession.componentsandAccountSessionCreateParams.components - ⚠️ Add support for new values
fee_credit_funding,inbound_transfer_reversal, andinbound_transferon enumBalanceTransaction.type - Add support for
sunbitonCharge.payment_method_details,ConfirmationToken.payment_method_preview,ConfirmationTokenCreateParams.testHelpers.payment_method_data,PaymentAttemptRecord.payment_method_details,PaymentIntentConfirmParams.payment_method_data,PaymentIntentCreateParams.payment_method_data,PaymentIntentUpdateParams.payment_method_data,PaymentMethodConfigurationCreateParams,PaymentMethodConfigurationUpdateParams,PaymentMethodConfiguration,PaymentMethodCreateParams,PaymentMethod,PaymentRecord.payment_method_details,SetupIntentConfirmParams.payment_method_data,SetupIntentCreateParams.payment_method_data, andSetupIntentUpdateParams.payment_method_data - ⚠️ Add support for new values
phantom_cashandusdton enumsCharge.payment_method_details.crypto.token_currency,PaymentAttemptRecord.payment_method_details.crypto.token_currency, andPaymentRecord.payment_method_details.crypto.token_currency - Add support for
locationandreaderonCharge.payment_method_details.klarna,PaymentAttemptRecord.payment_method_details.klarna, andPaymentRecord.payment_method_details.klarna - Add support for
mandateonCharge.payment_method_details.pix,PaymentAttemptRecord.payment_method_details.pix, andPaymentRecord.payment_method_details.pix - Add support for
managed_paymentsonCheckout.SessionCreateParams,Checkout.Session,PaymentIntent,PaymentLinkCreateParams,PaymentLink,SetupIntent, andSubscription - Add support for new value
sunbiton enumsCheckout.SessionCreateParams.excluded_payment_method_types,PaymentIntentConfirmParams.excluded_payment_method_types,PaymentIntentCreateParams.excluded_payment_method_types,PaymentIntentUpdateParams.excluded_payment_method_types,SetupIntentCreateParams.excluded_payment_method_types, andSetupIntentUpdateParams.excluded_payment_method_types - Add support for
mandate_optionsonCheckout.Session.payment_method_options.pix,Checkout.SessionCreateParams.payment_method_options.pix,PaymentIntent.payment_method_options.pix,PaymentIntentConfirmParams.payment_method_options.pix,PaymentIntentCreateParams.payment_method_options.pix, andPaymentIntentUpdateParams.payment_method_options.pix - Change type of
Checkout.SessionCreateParams.payment_method_options.pix.setup_future_usage,PaymentIntentConfirmParams.payment_method_options.pix.setup_future_usage,PaymentIntentCreateParams.payment_method_options.pix.setup_future_usage, andPaymentIntentUpdateParams.payment_method_options.pix.setup_future_usagefromliteral('none')toenum('none'|'off_session') - Add support for new value
sunbiton enumCheckout.SessionCreateParams.payment_method_types - ⚠️ Add support for new values
fo_vat,gi_tin,it_cf, andpy_rucon enumsCheckout.Session.customer_details.tax_ids[].type,Invoice.customer_tax_ids[].type,Tax.Calculation.customer_details.tax_ids[].type,Tax.Transaction.customer_details.tax_ids[].type, andTaxId.type - ⚠️ Change type of
Checkout.Session.payment_method_options.pix.setup_future_usageandPaymentIntent.payment_method_options.pix.setup_future_usagefromliteral('none')toenum('none'|'off_session') - Add support for new value
sunbiton 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.type - ⚠️ Add support for new value
sunbiton enumsConfirmationToken.payment_method_preview.typeandPaymentMethod.type - Add support for new values
fo_vat,gi_tin,it_cf, andpy_rucon enumsCustomerCreateParams.tax_id_data[].type,CustomerCreateTaxIdParams.type,InvoiceCreatePreviewParams.customer_details.tax_ids[].type,Tax.CalculationCreateParams.customer_details.tax_ids[].type, andTaxIdCreateParams.type - Add support for new value
sunbiton enumsCustomerListPaymentMethodsParams.type,PaymentMethodCreateParams.type, andPaymentMethodListParams.type - Add support for
pixonInvoice.payment_settings.payment_method_options,InvoiceCreateParams.payment_settings.payment_method_options,InvoiceUpdateParams.payment_settings.payment_method_options,Mandate.payment_method_details,SetupAttempt.payment_method_details,SetupIntent.payment_method_options,SetupIntentConfirmParams.payment_method_options,SetupIntentCreateParams.payment_method_options,SetupIntentUpdateParams.payment_method_options,Subscription.payment_settings.payment_method_options,SubscriptionCreateParams.payment_settings.payment_method_options, andSubscriptionUpdateParams.payment_settings.payment_method_options - Add support for
upionInvoice.payment_settings.payment_method_options,InvoiceCreateParams.payment_settings.payment_method_options,InvoiceUpdateParams.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 values
pixandupion enumsInvoiceCreateParams.payment_settings.payment_method_types,InvoiceUpdateParams.payment_settings.payment_method_types,SubscriptionCreateParams.payment_settings.payment_method_types, andSubscriptionUpdateParams.payment_settings.payment_method_types - ⚠️ Add support for new values
pixandupion enumsInvoice.payment_settings.payment_method_typesandSubscription.payment_settings.payment_method_types - Add support for
card_presenceonIssuing.Authorization - Add support for
allowed_card_presencesandblocked_card_presencesonIssuing.Card.spending_controls,Issuing.CardCreateParams.spending_controls,Issuing.CardUpdateParams.spending_controls,Issuing.Cardholder.spending_controls,Issuing.CardholderCreateParams.spending_controls, andIssuing.CardholderUpdateParams.spending_controls - ⚠️ Add support for new value
fulfillment_erroron enumIssuing.Card.cancellation_reason - ⚠️ Add support for new value
fulfillment_erroron enumIssuing.Card.replacement_reason - Add support for
amountandcurrencyonMandate.multi_use - Add support for
amount_to_confirmonPaymentIntentConfirmParams - ⚠️ Add support for new value
sunbiton enumsPaymentIntent.excluded_payment_method_typesandSetupIntent.excluded_payment_method_types - Add support for
klarna_display_qr_codeonPaymentIntent.next_action - Add support for new value
sunbiton enumsPaymentLinkCreateParams.payment_method_typesandPaymentLinkUpdateParams.payment_method_types - ⚠️ Add support for new value
sunbiton enumPaymentLink.payment_method_types - ⚠️ Add support for new values
low,not_assessed, andunknownon enumRadar.PaymentEvaluation.signals.fraudulent_payment.risk_level - Add support for new value
accounton enumRadar.ValueListCreateParams.item_type - ⚠️ Add support for new value
accounton enumRadar.ValueList.item_type - Add support for
motoonSetupAttempt.payment_method_details.card - Add support for
pix_display_qr_codeonSetupIntent.next_action - Add support for new value
2026-04-22.dahliaon enumWebhookEndpointCreateParams.api_version - Add support for error codes
action_blockedandapproval_requiredonInvoice.last_finalization_error,PaymentIntent.last_payment_error,SetupAttempt.setup_error,SetupIntent.last_setup_error, andStripeError
- Add support for
- #2688 Preserve stack traces for async operations
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.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.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 ⚠️ 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.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. 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
stripeMethodand 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 / awaitinstead - ⚠️ Remove support for passing a plain API key as a function arg. If supplied on a per-request basis, it should be in the
RequestOptionsunder theapiKeyproperty - ⚠️ Keys from
paramsandoptionsobjects 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 from
StripeResource:createFullPath,createResourcePathWithSymbols,extend,methodand_joinUrlParts. These were mostly intended for internal use and we no longer need them
- ⚠️ Remove support for providing callbacks to API methods. Use
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.
- ⚠️ Refactor how incoming method arguments are parsed. Type signatures for API methods should be much more accurate and reliable now
#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
Configuration
📅 Schedule: (UTC)
- Branch creation
- At any time (no schedule defined)
- 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.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.