stripe
23.2.0 · 19 Nov 2026MIT36.1M / weekRepositorynpmAtom feed
22.6.2 is the newest release of 22.x.
In short
3 breaking2 changed
- Breaking
The breaking changes in this release are prefixed with ⚠️ below.
- Breaking
⚠️ Remove
stripeMethodand standardize how function args are handled (including removing callback support) - Breaking
⚠️ 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.
Release note
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.
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_...");- Breaking
⚠️ 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
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 }) - Breaking
⚠️ 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', }); Converted V2/Amount.ts to V2/V2Amount.ts
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.