This release changes the pinned API version to 2026-03-25.dahlia and contains breaking changes (prefixed with ⚠️ below). There's also a detailed migration guide to simplify your upgrade process.
Please review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.
-
⚠️ Breaking change: #1769 Add decimal_string coercion for v1 and v2 API fields
- All
decimal_stringfields changed type fromstrtodecimal.Decimalin both request params and response objects. Code that reads or writes these fields asstrwill need to useDecimalinstead. Affected fields across v1 and v2 APIs:- checkout.Session:
fx_rate - climate.Order:
metric_tons; climate.Product:metric_tons_available - CreditNoteLineItem:
unit_amount_decimal - InvoiceItem:
quantity_decimal,unit_amount_decimal - InvoiceLineItem:
quantity_decimal,unit_amount_decimal - issuing.Authorization / issuing.Transaction (and TestHelpers):
quantity_decimal,unit_cost_decimal,gross_amount_decimal,local_amount_decimal,national_amount_decimal - Plan:
amount_decimal,flat_amount_decimal,unit_amount_decimal - Price:
unit_amount_decimal,flat_amount_decimal(includingcurrency_optionsandtiers) - v2.core.Account / v2.core.AccountPerson:
percent_ownership - Request params on Invoice, Product, Quote, Subscription, SubscriptionItem, SubscriptionSchedule, PaymentLink:
unit_amount_decimal,flat_amount_decimal,quantity_decimal(where applicable)
- checkout.Session:
- All
-
⚠️ Breaking change:#1767 Throw an error when using the wrong webhook parsing method
-
⚠️ Breaking change: #1764 Drop support for Python 3.7 & 3.8
-
⚠️ Breaking change: #1762
StripeObjectno longer inherits fromdictStripeObjectno longer inherits fromdict, so anydictmethods will no longer exist, including.get(),.update(), and notably,.items().- or convenience, it's still possible to check presence with
'some_key' in some_objand check for equality between stripe objects. But most key/value iteration needs an extra step - To access the underlying data as a
dict, callsome_obj.to_dict(), which recursively dumps all stripe-provided classes into native Python types. This is a read-only view; changes to the output ofto_dict()won't affect the original object. - Write operations can still be done with dot notation (
some_obj.val = 123) or bracket notation (some_obj["val"] = 123). Do that instead of trying to interact with the underlying data store, as the implementation is considered private and may change without warning in the future.