Skip to content

chore(deps): Update dependency stripe to v22#310

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/stripe-22.x
Open

chore(deps): Update dependency stripe to v22#310
renovate[bot] wants to merge 1 commit intomainfrom
renovate/stripe-22.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 6, 2026

This PR contains the following updates:

Package Change Age Confidence
stripe ^20.3.1^22.0.0 age confidence

Release Notes

stripe/stripe-node (stripe)

v22.0.1

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.

v22.0.0

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

v21.0.1

Compare Source

v21.0.0

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
    • "before 3am on Monday"
  • 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.

@renovate renovate bot force-pushed the renovate/stripe-22.x branch from f09534a to 179a50b Compare April 6, 2026 02:39
@renovate renovate bot force-pushed the renovate/stripe-22.x branch from 179a50b to 791b6d0 Compare April 8, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants