This release changes the pinned API version to 2025-09-30.clover
and contains breaking changes (prefixed with ⚠️ below)
-
#1604 Fixed InvoiceLineItem method definition
- ⚠️
InvoiceLineItem.modify
andInvoiceLineItem.modify_async
now requireinvoice
andline_item_id
as method parameters.- Removed
InvoiceLineItem.ModifyParam
class. Use atyping.dict
to type hint instead.
- Removed
- ⚠️
-
#1538 ⚠️ Add strongly typed EventNotifications
We've overhauled how V2 Events are handled in the SDK! This approach should provide a lot more information at authoring and compile time, leading to more robust integrations. As part of this process, there are a number of changes to be aware of.- Added matching
EventNotification
classes to every v2Event
. For example, there's now aV1BillingMeterErrorReportTriggeredEventNotification
to match the existingV1BillingMeterErrorReportTriggeredEvent
. Each notification class defines afetch_event()
method to retrieve its corresponding event. For events with related objects, there's afetch_related_object()
method that performs the API call and casts the response to the correct type. - ⚠️ Rename function
StripeClient.parse_thin_event
toStripeClient.parse_event_notification
and remove theStripe.ThinEvent
class.- This function now returns a
stripe.v2.core.EventNotification
(which is the shared base class that all of the more specificstripe.events.*EventNotification
classes share) instead ofStripe.ThinEvent
. When applicable, these event notifications will have therelated_object
property and afetch_related_object()
function. They also have afetch_()
method to retrieve their correspondingstripe.events.*Event
instance. - If you parse an event the SDK doesn't have types for (e.g. it's newer than the SDK you're using), you'll get an instance of
Stripe.Events.UnknownEventNotification
instead of a more specific type. It has both therelatedObject
property and theFetchRelatedObject()
function (but they may be/returnnull
)
- This function now returns a
- Added matching
-
#1602 Move
V2.Event
API resources toV2.Core.Events
- ⚠️ Move
stripe.v2._event
andstripe.v2._event_destination
tostripe.v2.core._event
andstripe.v2.core._event_destination
respectively. They now correctly match their API path
- ⚠️ Move
-
#1589 Add
StripeContext
object- Add the
StripeContext
class. Previously, one could only pass a string forstripe_context
. You can now use the new class as well. - ⚠️ Change
EventNotification
(formerly known asThinEvent
)'scontext
property fromstring
toStripeContext
- Add the
-
#1565 ⚠️ Build SDK w/ V2 OpenAPI spec
- ⚠️ The delete methods for v2 APIs (the ones in the
StripeClient.v2
namespace) now return aV2DeletedObject
which has the id of the object that has been deleted and a string representing the type of the object that has been deleted. - ⚠️ Deeply nested param hashes with no properties no longer have classes generated for them. Instead, they're typed as
Dict[str, Any]
. Because there were no params, it's unlikely you were using these classes.
- ⚠️ The delete methods for v2 APIs (the ones in the
-
#1569 Renamed Urllib2Client to UrllibClient
- ⚠️ Rename
http_client.Urllib2Client
tohttp_client.UrllibClient
as Pythonurllib2
was renamed tourllib
in Python 3.
- ⚠️ Rename
-
#1606 ⚠️ drop support for Python 3.6 & clarify version policy
- Read our new language version support policy
- ⚠️ In this release, we drop support for Python 3.6
- Support for Python 3.7 is deprecated and will be removed in the next scheduled major release (March 2026)
- Read our new language version support policy
-
#1596 ⚠️ Unify resource and service method parameters into one class
- ⚠️ Resource and service request parameter types have been moved to the top-level and are shared, prepended with their related resource/service
- For example,
_stripe._account.Account.CreateParams
and_stripe._account_service.CreateParams
have moved to_stripe.params._account_create_params.AccountCreateParams
- This change only affects users who explicitly refer to params types. No migration is necessary for users otherwise
- For example,
- ⚠️ Resource and service request parameter types have been moved to the top-level and are shared, prepended with their related resource/service
-
#1572 migrate from
setup.py
topyproject.toml
- ⚠️ The package has swapped from
setup.py
topyproject.toml
. As a result, we're dropping support forpip < 10.0.0
(released April 2018). - Additionally, we're no longer shipping tests or examples in our sdist now, which should offer a small size reduction for the package if installed without the wheel (approx. 2.5MB unzipped)
- ⚠️ The package has swapped from
-
#1570 Don't use mutable default arguments
- Service methods now correctly set
None
as the default function argument instead of{}
- Service methods now correctly set
-
⚠️ Deprecated the V1 service accessors living directly under StripeClient(e.g. customers, products) as they were copied under the new V1 service in our last release. Service accessors living directly under StripeClient(e.g. customers, products) will be removed from StripeClient in a future release. E.g.
client = StripeClient("sk_test...") # Accessing V1 Stripe services on a StripeClient should be through the V1 namespace - client.customers.list() + client.v1.customers.list()
Refer to the migration guide for help upgrading.
-
#1603 ⚠️ Remove deprecated compatibility exports
- ⚠️ Removed deprecated module shims. They've long been available in the
stripe
module directly; now that's the only place to import them. Specifically, we removed:stripe.stripe_response
stripe.stripe_object
stripe.error_object
stripe.error
stripe.http_client
stripe.util
stripe.oauth
stripe.webhook
stripe.multipart_data_generator
stripe.request_metrics
stripe.api_resources.abstract
stripe.api_resources
To update your code, follow this pattern:
-from stripe.<MODULE> import SomeClass +from stripe import SomeClass -stripe.<MODULE>.SomeClass +stripe.SomeClass
- ⚠️ Removed the
FileUpload
alias
To update your code:
-from stripe import FileUpload -from stripe.api_resources import FileUpload +from stripe import File
- ⚠️ Removed the
io
import fromstripe._util
. If you had code relying onstripe.util.io
, you'll need to import theio
package directly yourself. - added
UrllibClient
tostripe
to make creating your own HTTP client easier.
- ⚠️ Removed deprecated module shims. They've long been available in the
-
#1567, #1593, #1607, #1605 Update generated code based on incoming API changes in the
2025-09-30.clover
API version.- ⚠️ Remove support for
balance_report
andpayout_reconciliation_report
onAccountSession.Component
andAccountSession.CreateParamsComponent
- ⚠️ Remove support for values
saturday
andsunday
from enumsAccount.CreateParamsSettingPayoutSchedule.weekly_payout_days
,Account.ModifyParamsSettingPayoutSchedule.weekly_payout_days
, andAccount.Setting.Payout.Schedule.weekly_payout_days
- ⚠️ Remove support for
iterations
onInvoice.CreatePreviewParamsScheduleDetailPhase
,SubscriptionSchedule.CreateParamsPhase
, andSubscriptionSchedule.ModifyParamsPhase
- ⚠️ Remove support for
link
andpay_by_bank
onPaymentMethod.ModifyParams
- ⚠️ Remove support for
coupon
onDiscount
,PromotionCode.CreateParams
, andPromotionCode
. UseDiscount.source.coupon
,PromotionCode.CreateParams.promotion.coupon
, andPromotionCode.promotion.coupon
instead. - Add support for new value
prevented
on enumDispute.status
- Change
Invoice.id
to be required. - Add support for new resource
BalanceSettings
- Add support for
modify
andretrieve
methods on resourceBalanceSettings
- Add support for new values
external_request
andunsupported_business_type
on enumsAccount.FutureRequirement.Error.code
,Account.Requirement.Error.code
,BankAccount.FutureRequirement.Error.code
,BankAccount.Requirement.Error.code
,Capability.FutureRequirement.Error.code
,Capability.Requirement.Error.code
,Person.FutureRequirement.Error.code
, andPerson.Requirement.Error.code
- Add support for
source
onDiscount
- Add support for
mb_way_payments
onAccount.Capability
,Account.CreateParamsCapability
, andAccount.ModifyParamsCapability
- Add support for
trial_update_behavior
onBillingPortal.Configuration.Feature.SubscriptionUpdate
,billing_portal.Configuration.CreateParamsFeatureSubscriptionUpdate
, andbilling_portal.Configuration.ModifyParamsFeatureSubscriptionUpdate
- Add support for
mb_way
onCharge.PaymentMethodDetail
,ConfirmationToken.CreateParamsPaymentMethodDatum
,ConfirmationToken.PaymentMethodPreview
,PaymentIntent.ConfirmParamsPaymentMethodDatum
,PaymentIntent.ConfirmParamsPaymentMethodOption
,PaymentIntent.CreateParamsPaymentMethodDatum
,PaymentIntent.CreateParamsPaymentMethodOption
,PaymentIntent.ModifyParamsPaymentMethodDatum
,PaymentIntent.ModifyParamsPaymentMethodOption
,PaymentIntent.PaymentMethodOption
,PaymentMethod.CreateParams
,PaymentMethod
,SetupIntent.ConfirmParamsPaymentMethodDatum
,SetupIntent.CreateParamsPaymentMethodDatum
, andSetupIntent.ModifyParamsPaymentMethodDatum
- Add support for
branding_settings
andname_collection
onCheckout.Session
andcheckout.Session.CreateParams
- Add support for
excluded_payment_method_types
onCheckout.Session
,PaymentIntent.ConfirmParams
,PaymentIntent.ModifyParams
, andcheckout.Session.CreateParams
- Add support for
unit_label
onInvoice.AddLinesParamsLinePriceDatumProductDatum
,Invoice.UpdateLinesParamsLinePriceDatumProductDatum
,InvoiceLineItem.ModifyParamsPriceDatumProductDatum
,PaymentLink.CreateParamsLineItemPriceDatumProductDatum
, andcheckout.Session.CreateParamsLineItemPriceDatumProductDatum
- Add support for
alma
,billie
, andsatispay
onCheckout.Session.PaymentMethodOption
andcheckout.Session.CreateParamsPaymentMethodOption
- Add support for
demo_pay
oncheckout.Session.CreateParamsPaymentMethodOption
- Add support for
capture_method
onCheckout.Session.PaymentMethodOption.Affirm
,Checkout.Session.PaymentMethodOption.AfterpayClearpay
,Checkout.Session.PaymentMethodOption.AmazonPay
,Checkout.Session.PaymentMethodOption.Card
,Checkout.Session.PaymentMethodOption.Cashapp
,Checkout.Session.PaymentMethodOption.Klarna
,Checkout.Session.PaymentMethodOption.Link
,Checkout.Session.PaymentMethodOption.Mobilepay
,Checkout.Session.PaymentMethodOption.RevolutPay
,checkout.Session.CreateParamsPaymentMethodOptionAffirm
,checkout.Session.CreateParamsPaymentMethodOptionAfterpayClearpay
,checkout.Session.CreateParamsPaymentMethodOptionAmazonPay
,checkout.Session.CreateParamsPaymentMethodOptionCard
,checkout.Session.CreateParamsPaymentMethodOptionCashapp
,checkout.Session.CreateParamsPaymentMethodOptionKlarna
,checkout.Session.CreateParamsPaymentMethodOptionLink
,checkout.Session.CreateParamsPaymentMethodOptionMobilepay
, andcheckout.Session.CreateParamsPaymentMethodOptionRevolutPay
- Add support for
flexible
onInvoice.CreatePreviewParamsScheduleDetailBillingMode
,Invoice.CreatePreviewParamsSubscriptionDetailBillingMode
,Quote.CreateParamsSubscriptionDatumBillingMode
,Quote.SubscriptionDatum.BillingMode
,Subscription.BillingMode
,Subscription.CreateParamsBillingMode
,Subscription.MigrateParamsBillingMode
,SubscriptionSchedule.BillingMode
,SubscriptionSchedule.CreateParamsBillingMode
, andcheckout.Session.CreateParamsSubscriptionDatumBillingMode
- Add support for
business_name
andindividual_name
onCheckout.Session.CollectedInformation
,Checkout.Session.CustomerDetail
,Customer.CreateParams
,Customer.ModifyParams
, andCustomer
- Add support for new values
mb_way
on enumsConfirmationToken.CreateParamsPaymentMethodDatum.type
,PaymentIntent.ConfirmParamsPaymentMethodDatum.type
,PaymentIntent.CreateParamsPaymentMethodDatum.type
,PaymentIntent.ModifyParamsPaymentMethodDatum.type
,SetupIntent.ConfirmParamsPaymentMethodDatum.type
,SetupIntent.CreateParamsPaymentMethodDatum.type
, andSetupIntent.ModifyParamsPaymentMethodDatum.type
- Add support for new values
mb_way
on enumsConfirmationToken.PaymentMethodPreview.type
andPaymentMethod.type
- Add support for new values
mb_way
on enumsCustomer.ListPaymentMethodsParams.type
,PaymentMethod.CreateParams.type
, andPaymentMethod.ListParams.type
- Add support for
chargeback_loss_reason_code
onDispute.PaymentMethodDetail.Klarna
- Add support for
net_amount
andproration_details
onInvoiceItem
- Add support for
fraud_disputability_likelihood
andrisk_assessment
onissuing.Authorization.CreateParams
- Add support for
second_line
onIssuing.Card
- Add support for new values
mb_way
on enumsPaymentIntent.CreateParams.excluded_payment_method_types
andPaymentIntent.excluded_payment_method_types
- Add support for
fr_meal_voucher_conecs
onPaymentMethodConfiguration.CreateParams
andPaymentMethodConfiguration.ModifyParams
- Add support for
promotion
onPromotionCode.CreateParams
andPromotionCode
- Add support for new values
acknowledged
andpayment_never_settled
on enumReview.closed_reason
- Add support for
provider
onTax.Settings.Default
- Add support for
bbpos_wisepad3
onTerminal.Configuration
,terminal.Configuration.CreateParams
, andterminal.Configuration.ModifyParams
- Add support for
address_kana
,address_kanji
,display_name_kana
,display_name_kanji
, andphone
onTerminal.Location
,terminal.Location.CreateParams
, andterminal.Location.ModifyParams
- Change
terminal.Location.CreateParams.address
to be optional - Change
terminal.Location.CreateParams.display_name
to be optional - Add support for new value
2025-09-30.clover
on enumWebhookEndpoint.CreateParams.api_version
- Add support for error codes
financial_connections_account_pending_account_numbers
andfinancial_connections_account_unavailable_account_numbers
onInvoice.LastFinalizationError
,PaymentIntent.LastPaymentError
,SetupAttempt.SetupError
,SetupIntent.LastSetupError
, andStripeError
- ⚠️ Remove support for