-
Notifications
You must be signed in to change notification settings - Fork 842
Migration guide for v11
Major version release for API version 2022-11-15. "
- Drop support for Node.js 8 and 10. We now support Node.js 12+.
- Change
StripeSignatureVerificationErrorto haveheaderandpayloadfields instead ofdetail. To access these properties, useerr.headeranderr.payloadinstead oferr.detail.headeranderr.detail.payload.
-
Remove
Ordersresource. -
Remove
SKUresource. -
Remove deprecated
CheckoutSessionCreateParams.subscription_data.items. -
Remove deprecated configuration setter methods (
setHost,setProtocol,setPort,setApiVersion,setApiKey,setTimeout,setAppInfo,setHttpAgent,setMaxNetworkRetries, andsetTelemetryEnabled).Use the config object to set these options instead, for example:
const stripe = Stripe('sk_test_...', { apiVersion: '2019-08-08', maxNetworkRetries: 1, httpAgent: new ProxyAgent(process.env.http_proxy), timeout: 1000, host: 'api.example.com', port: 123, telemetry: true, });
-
Remove deprecated basic method definitions. Use basic methods defined on the resource instead.
// Before basicMethods: true // After create: stripeMethod({ method: 'POST', fullPath: '/v1/resource', }), list: stripeMethod({ method: 'GET', methodType: 'list', fullPath: '/v1/resource', }), retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/resource/{id}', }), update: stripeMethod({ method: 'POST', fullPath: '/v1/resource/{id}', }), // Avoid 'delete' keyword in JS del: stripeMethod({ method: 'DELETE', fullPath: '/v1/resource/{id}', }),
-
Remove deprecated option names. Use the following option names instead (
OLD->NEW):api_key->apiKey,idempotency_key->idempotencyKey,stripe_account->stripeAccount,stripe_version->apiVersion,stripeVersion->apiVersion. -
Remove
chargesfield onPaymentIntentand replace it withlatest_charge. -
Remove deprecated
amountfield onCheckout.Session.LineItem. -
Remove support for
tos_shown_and_acceptedonCheckout.Session.PaymentMethodOptions.Paynow.
Read more at https://stripe.com/docs/upgrades#2022-11-15