Migration guide for v13 (original) (raw)

The v13 of the Python SDK uses the API version 2025-09-30.clover. If the format of this API version looks new to you, see our new API release process

The new API version comes with a quite a few breaking changes, most notably:

Please review our API changelog for 2025-09-30.clover to understand all the breaking changes to the Stripe API, the reasons behind them and potential alternatives.

The Python SDK specific changelog for v13 will have the corresponding changes in the SDKs as well as SDK specific breaking changes.

Parameter type unification

Resource and service parameters have been unified to increase consistency and decrease package size in this major. Parameters in resources and services have been moved to the stripe.params package, prefixed with the relevant resource/service and method name.

For example, stripe.CustomerService.CreateParams is now stripe.params.CustomerCreateParams. Namespaced parameters can be found in their respective namespace, such as stripe.params.checkout.SessionCreateParams. There are no changes necessary if you do not reference parameter types directly when making requests, like so:

from stripe import StripeClient

client = StripeClient(API_KEY) client.v1.customers.create({ name="Foo", email="bar@example.com" })

If you use parameter types directly, you will need to update your imports. For example:

Before

from stripe import StripeClient from stripe import CustomerService

client = StripeClient(API_KEY) params: CustomerService.CreateParams = { "name": "Foo", "email": "bar@example.com" } client.v1.customers.create(params)

After

from stripe import StripeClient from stripe.params import CustomerCreateParams

client = StripeClient(API_KEY) params: CustomerCreateParams = { "name": "Foo", "email": "bar@example.com" } client.v1.customers.create(params)