warningBreaking change

Stripe Node SDK v22: breaking API changes

Announced
3 Apr 2026
Effective
no date announced
Version
22.0.0
Source
the vendor’s own page · last checked 29 Sept 2026

What breaks

This release contains several breaking changes to types and method call handling.

  • Stripe.StripeContext is no longer exported as a type
  • Stripe.errors.StripeError is no longer a type
  • CJS entry point no longer exports .default or .Stripe as separate properties
  • The Stripe import is now a true ES6 class; calling Stripe("sk_test_...") without new no longer works
  • stripeMethod has been removed
  • Callback support for API methods has been removed
  • Passing a plain API key as a function argument no longer works
  • Keys from params and options objects are no longer mixed; RequestParams must come first and RequestOptions second
  • Removed methods from StripeResource: createFullPath, createResourcePathWithSymbols, extend, method, and _joinUrlParts
  • Calls like stripe.customers.retrieve('cus_123', 'sk_test_123'), passing an API key inside params, or passing a callback function no longer work

What to do

Update code and types to match the new v22 conventions.

  • Use new Stripe() to construct a client instead of calling Stripe() directly
  • Replace Stripe.StripeContext with Stripe.StripeContextType
  • Replace Stripe.errors.StripeError type usage with typeof Stripe.errors.StripeError or Stripe.ErrorType
  • Replace callback-based API calls with async/await
  • Move any per-request API key into RequestOptions.apiKey instead of passing it as a function arg
  • Ensure RequestParams is always the first argument and RequestOptions the second, passing undefined explicitly if only options are needed
  • Remove any use of the removed StripeResource methods
  • Consult Stripe's published migration guide for v22 for full details

What the vendor said

Stripe Node SDK v22.0.0 is out, pinned to the same API version as the prior major release. It overhauls TypeScript types and changes how method arguments are parsed, removing several call patterns and helper methods that used to be supported.

Watching more than one repository?

The team plan is not open yet.

No account, and no repository read. We store the address and the date, and nothing else — see privacy.