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.StripeContextis no longer exported as a typeStripe.errors.StripeErroris no longer a type- CJS entry point no longer exports
.defaultor.Stripeas separate properties - The
Stripeimport is now a true ES6 class; callingStripe("sk_test_...")withoutnewno longer works stripeMethodhas been removed- Callback support for API methods has been removed
- Passing a plain API key as a function argument no longer works
- Keys from
paramsandoptionsobjects are no longer mixed;RequestParamsmust come first andRequestOptionssecond - 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 callingStripe()directly - Replace
Stripe.StripeContextwithStripe.StripeContextType - Replace
Stripe.errors.StripeErrortype usage withtypeof Stripe.errors.StripeErrororStripe.ErrorType - Replace callback-based API calls with
async/await - Move any per-request API key into
RequestOptions.apiKeyinstead of passing it as a function arg - Ensure
RequestParamsis always the first argument andRequestOptionsthe second, passingundefinedexplicitly if only options are needed - Remove any use of the removed
StripeResourcemethods - 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.