Releases: stripe/stripe-python
Releases · stripe/stripe-python
v8.1.0
- #1213 Update generated code
- Add support for
swish
payment method throughout the API - Add support for
relationship
on parameter classesAccount.CreateParamsIndividual
andToken.CreateParamsAccountIndividual
- Add support for
jurisdiction_level
on resourceTaxRate
- Change type from
str
toLiteral["offline", "online"]
ofstatus
on fieldterminal.Reader
- Add support for
v8.1.0b1
v8.0.0
-
#1206 stripe-python v8 release
This release introducesStripeClient
and a service-based call pattern. This new interface allows you to easily call Stripe APIs and has several benefits over the existing resource-based pattern:- No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
- No static methods for easier mocking
For full migration instructions, please refer to the v8 migration guide.
"
⚠️ " symbol highlights breaking changes⚠️ Changed⚠️ Request options likeapi_key
,stripe_account
,stripe_version
, andidempotency_key
can no longer be passed in positionally on resource methods. Please pass these in as keyword arguments.
BEFORE
stripe.Customer.create( "sk_test_123", # api key "KG5LxwFBepaKHyUD", # idempotency key "2022-11-15", # stripe version "acct_123", # stripe account )
AFTER
stripe.Customer.create( api_key="sk_test_123", idempotency_key="KG5LxwFBepaKHyUD", stripe_version="2022-11-15", stripe_account="acct_123", )
⚠️ Methods that turn a response stream (Quote.pdf
) now returns a single value of typeStripeResponseStream
instead of a tuple containing(StripeResponseStream, api_key)
.⚠️ Removed public access toAPIRequestor
.APIRequestor
's main use is internal, and we don't have a good understanding of its external use cases. We had to make several breaking changes to its interface as part of this update, so rather than leaving it public we made it private. If you have a use case forAPIRequestor
, please open up a Github issue describing it. We'd rather you rely on something specifically designed for your use case than having to reach into the library's internals.
⚠️ Removed⚠️ Removeapi_version
fromFile.create
parameters. Please usestripe_version
instead.⚠️ Removeutil.read_special_variable()
utility method (importing directly fromstripe.util
is deprecated as of v7.8.0)⚠️ RemoveStripeError.construct_error_object()
. This method was intended for internal stripe-python use only.⚠️ RemoveListObject.empty_list()
. This method was intended for internal stripe-python use only.⚠️ RemoveSearchResultObject.empty_search_result()
. This method was intended for internal stripe-python use only.⚠️ RemoveStripeObject.ReprJSONEncoder
. This class was intended for internal stripe-python use only.⚠️ RemoveStripeObject.api_base
. This property was defunct and returnedNone
.
v7.14.0
- #1199 Update generated code
- Add support for
annual_revenue
andestimated_worker_count
onAccount.business_profile
,Account.CreateParams.business_profile
, andAccount.UpdateParams.business_profile
- Add support for new value
registered_charity
on enumsAccount.CreateParams.company.structure
,Account.UpdateParams.company.structure
, andToken.CreateParams.account.company.structure
- Add support for
collection_options
onAccountLink.CreateParams
- Add support for
liability
onCheckout.Session.automatic_tax
,PaymentLink.automatic_tax
,PaymentLink.CreateParams.automatic_tax
,PaymentLink.UpdateParams.automatic_tax
,Quote.automatic_tax
,Quote.CreateParams.automatic_tax
,Quote.UpdateParams.automatic_tax
,SubscriptionSchedule.default_settings.automatic_tax
,SubscriptionSchedule.phases[].automatic_tax
,SubscriptionSchedule.CreateParams.default_settings.automatic_tax
,SubscriptionSchedule.CreateParams.phases[].automatic_tax
,SubscriptionSchedule.UpdateParams.default_settings.automatic_tax
,SubscriptionSchedule.UpdateParams.phases[].automatic_tax
, andcheckout.Session.CreateParams.automatic_tax
- Add support for
issuer
onCheckout.Session.invoice_creation.invoice_data
,PaymentLink.invoice_creation.invoice_data
,PaymentLink.CreateParams.invoice_creation.invoice_data
,PaymentLink.UpdateParams.invoice_creation.invoice_data
,Quote.invoice_settings
,Quote.CreateParams.invoice_settings
,Quote.UpdateParams.invoice_settings
,SubscriptionSchedule.default_settings.invoice_settings
,SubscriptionSchedule.phases[].invoice_settings
,SubscriptionSchedule.CreateParams.default_settings.invoice_settings
,SubscriptionSchedule.CreateParams.phases[].invoice_settings
,SubscriptionSchedule.UpdateParams.default_settings.invoice_settings
,SubscriptionSchedule.UpdateParams.phases[].invoice_settings
, andcheckout.Session.CreateParams.invoice_creation.invoice_data
- Add support for
invoice_settings
onPaymentLink.subscription_data
,PaymentLink.CreateParams.subscription_data
,PaymentLink.UpdateParams.subscription_data
, andcheckout.Session.CreateParams.subscription_data
- Add support for new value
challenge
on enumsInvoice.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure
,Invoice.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure
,Subscription.CreateParams.payment_settings.payment_method_options.card.request_three_d_secure
, andSubscription.UpdateParams.payment_settings.payment_method_options.card.request_three_d_secure
- Add support for
promotion_code
onInvoice.UpcomingLinesParams.discounts[]
,Invoice.UpcomingLinesParams.invoice_items[].discounts[]
,Invoice.UpcomingParams.discounts[]
, andInvoice.UpcomingParams.invoice_items[].discounts[]
- Add support for
account_type
onPaymentMethod.UpdateParams.us_bank_account
- Add support for
v7.14.0b1
- #1197 Update generated code for beta
Release specs are identical. - #1192 Update generated code for beta
- Add support for new value
nn
on enumConfirmationToken.PaymentMethodPreview.Ideal.bank
- Add support for new value
NNBANL2G
on enumConfirmationToken.PaymentMethodPreview.Ideal.bic
- Change
Invoice.AutomaticTax.liability
,Invoice.issuer
, andSubscription.AutomaticTax.liability
to be required
- Add support for new value
v7.13.0
- #1193 Update generated code
- Add support for providing details about
BankAccount
,Card
, andCardToken
onAccount.CreateExternalAccountParams.external_account
andAccount.CreateParams.external_account
- Add support for new value
nn
on enumsCharge.PaymentMethodDetails.Ideal.bank
,PaymentIntent.ConfirmParamsPaymentMethodDataIdeal.bank
,PaymentIntent.CreateParamsPaymenMethodDataIdeal.bank
,PaymentIntent.UpdateParamsPaymentMethodDataIdeal.bank
,PaymentMethod.Ideal.bank
,PaymentMethod.CreateParamsIdeal.bank
,SetupAttempt.PaymentMethodDetails.Ideal.bank
,SetupIntent.ConfirmParamsPaymenMethodDataIdeal.bank
,SetupIntent.CreateParamsPaymenMethodDataIdeal.bank
, andSetupIntent.UpdateParamsPaymenMethodDataIdeal.bank
- Add support for new value
NNBANL2G
on enumsCharge.PaymentMethodDetails.Ideal.bic
,PaymentMethod.Ideal.bic
, andSetupAttempt.PaymentMethodDetails.Ideal.bic
- Change
CustomerSession.Components.buy_button
andCustomerSession.Components.pricing_table
to be required - Add support for
issuer
onInvoice.CreateParams
,Invoice.UpcomingLinesParams
,Invoice.UpcomingParams
,Invoice.UpdateParams
, andInvoice
- Add support for
liability
onInvoice.automatic_tax
,Invoice.CreateParams.automatic_tax
,Invoice.UpcomingLinesParams.automatic_tax
,Invoice.UpcomingParams.automatic_tax
,Invoice.UpdateParams.automatic_tax
,Subscription.automatic_tax
,Subscription.CreateParams.automatic_tax
, andSubscription.UpdateParams.automatic_tax
- Add support for
on_behalf_of
onInvoice.UpcomingLinesParams
andInvoice.UpcomingParams
- Add support for
pin
onissuing.Card.CreateParams
- Add support for
revocation_reason
onMandate.PaymentMethodDetails.bacs_debit
- Add support for
customer_balance
onPaymentMethodConfiguration.CreateParams
,PaymentMethodConfiguration.UpdateParams
, andPaymentMethodConfiguration
- Add support for
invoice_settings
onSubscription.CreateParams
andSubscription.UpdateParams
- Add support for providing details about
v7.13.0b1
v7.12.0
- #1188 Update generated code
- Add support for new resource
CustomerSession
- Add support for
create
method on resourceCustomerSession
- Remove support for values
obligation_inbound
,obligation_payout_failure
,obligation_payout
, andobligation_reversal_outbound
from enumBalanceTransaction.type
- Add support for new values
eps
andp24
on enumsInvoice.payment_settings.payment_method_types[]
,InvoiceCreateParams.payment_settings.payment_method_types[]
,InvoiceUpdateParams.payment_settings.payment_method_types[]
,Subscription.payment_settings.payment_method_types[]
,SubscriptionCreateParams.payment_settings.payment_method_types[]
, andSubscriptionUpdateParams.payment_settings.payment_method_types[]
- Remove support for value
obligation
from enumReporting.ReportRunCreateParams.parameters.reporting_category
- Add support for
billing_cycle_anchor_config
onSubscriptionCreateParams
andSubscription
- Add support for new resource
v7.12.0b1
- #1187 Update generated code for beta
- Updated stable APIs to the latest version
v7.11.0
- #1186 Update generated code
- Add support for
retrieve
on resourcetax.Registration
- Change type from
Optional[PaymentDetails]
toPaymentDetails
ofpayment_details
on fieldAccountSession.Components
- Change type from
Optional[Payments]
toPayments
ofpayments
on fieldAccountSession.Components
- Change type from
Optional[Payouts]
toPayouts
ofpayouts
on fieldAccountSession.Components
- Change type from
Optional[Features]
toFeatures
offeatures
on fieldsAccountSession.Components.PaymentDetails
,AccountSession.Components.Payments
, andAccountSession.Components.Payouts
- Change type from
Optional[InvoiceSettings]
toInvoiceSettings
ofinvoice_settings
on fieldSubscriptionSchedule.DefaultSettings
- Add support for