NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #633 most downloaded on PyPI
Python bindings for the Stripe API
Last release 6 days ago
23 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
15 years old
568 releases · first in 2011
Add support for external_account_collection on resource class stripe.AccountSession.Components.AccountOnboarding.Features and parameter class stripe.A
external_account_collection on resource class stripe.AccountSession.Components.AccountOnboarding.Features and parameter class stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeaturesaccount_management on resource class stripe.AccountSession.Components and parameter class stripe.AccountSession.CreateParamsComponentsnotification_banner on resource class stripe.AccountSession.Components and parameter class stripe.AccountSession.CreateParamsComponentsamazon_pay on resource classes stripe.Charge.PaymentMethodDetails, stripe.ConfirmationToken.PaymentMethodPreview, stripe.PaymentIntent.PaymentMethodOptions, stripe.Refund.DestinationDetails, stripe.SetupIntent.PaymentMethodOptions, and stripe.checkout.Session.PaymentMethodOptions, parameter classes stripe.ConfirmationToken.CreateParamsPaymentMethodData, stripe.PaymentIntent.ConfirmParamsPaymentMethodData, stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions, stripe.PaymentIntent.CreateParamsPaymentMethodData, stripe.PaymentIntent.CreateParamsPaymentMethodOptions, stripe.PaymentIntent.ModifyParamsPaymentMethodData, stripe.PaymentIntent.ModifyParamsPaymentMethodOptions, stripe.PaymentMethod.CreateParams, stripe.PaymentMethodConfiguration.CreateParams, stripe.PaymentMethodConfiguration.ModifyParams, stripe.SetupIntent.ConfirmParamsPaymentMethodData, stripe.SetupIntent.ConfirmParamsPaymentMethodOptions, stripe.SetupIntent.CreateParamsPaymentMethodData, stripe.SetupIntent.CreateParamsPaymentMethodOptions, stripe.SetupIntent.ModifyParamsPaymentMethodData, stripe.SetupIntent.ModifyParamsPaymentMethodOptions, and stripe.checkout.Session.CreateParamsPaymentMethodOptions, and resources stripe.PaymentMethod and stripe.PaymentMethodConfigurationnext_refresh_available_at on resource class stripe.financial_connections.Account.OwnershipRefreshcancel on stripe.billing.MeterEventAdjustment from Cancel to Optional[Cancel]identifier on stripe.billing.MeterEventAdjustment.Cancel from str to Optional[str]identifier on stripe.billing.MeterEventAdjustment.CreateParamsCancel from str to NotRequired[str]cancel on stripe.billing.MeterEventAdjustment.CreateParams from MeterEventAdjustment.CreateParamsCancel to NotRequired[MeterEventAdjustment.CreateParamsCancel]type on stripe.billing.MeterEventAdjustment.CreateParams from NotRequired[Literal['cancel']] to Literal['cancel']bh_vat on enums stripe.checkout.Session.CustomerDetails.TaxId.type, stripe.Customer.CreateParamsTaxIdDatum.type, stripe.Customer.CreateTaxIdParams.type, stripe.Invoice.CustomerTaxId.type, stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type, stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type, stripe.tax.Calculation.CustomerDetails.TaxId.type, stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type, stripe.tax.Transaction.CustomerDetails.TaxId.type, stripe.TaxId.type, and stripe.TaxId.CreateParams.typekz_bin on enums stripe.checkout.Session.CustomerDetails.TaxId.type, stripe.Customer.CreateParamsTaxIdDatum.type, stripe.Customer.CreateTaxIdParams.type, stripe.Invoice.CustomerTaxId.type, stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type, stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type, stripe.tax.Calculation.CustomerDetails.TaxId.type, stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type, stripe.tax.Transaction.CustomerDetails.TaxId.type, stripe.TaxId.type, and stripe.TaxId.CreateParams.typeng_tin on enums stripe.checkout.Session.CustomerDetails.TaxId.type, stripe.Customer.CreateParamsTaxIdDatum.type, stripe.Customer.CreateTaxIdParams.type, stripe.Invoice.CustomerTaxId.type, stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type, stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type, stripe.tax.Calculation.CustomerDetails.TaxId.type, stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type, stripe.tax.Transaction.CustomerDetails.TaxId.type, stripe.TaxId.type, and stripe.TaxId.CreateParams.typeom_vat on enums stripe.checkout.Session.CustomerDetails.TaxId.type, stripe.Customer.CreateParamsTaxIdDatum.type, stripe.Customer.CreateTaxIdParams.type, stripe.Invoice.CustomerTaxId.type, stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type, stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type, stripe.tax.Calculation.CustomerDetails.TaxId.type, stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type, stripe.tax.Transaction.CustomerDetails.TaxId.type, stripe.TaxId.type, and stripe.TaxId.CreateParams.typeownership on enums stripe.checkout.Session.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch, stripe.checkout.Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.permissions, stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch, stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.PaymentIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch, stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.SetupIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch, stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.permissions, stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch, stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch, and stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetchamazon_pay on enums stripe.checkout.Session.CreateParams.payment_method_types, stripe.ConfirmationToken.PaymentMethodPreview.type, stripe.ConfirmationToken.CreateParamsPaymentMethodData.type, stripe.Customer.ListPaymentMethodsParams.type, stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type, stripe.PaymentIntent.CreateParamsPaymentMethodData.type, stripe.PaymentIntent.ModifyParamsPaymentMethodData.type, stripe.PaymentMethod.type, stripe.PaymentMethod.CreateParams.type, stripe.PaymentMethod.ListParams.type, stripe.SetupIntent.ConfirmParamsPaymentMethodData.type, stripe.SetupIntent.CreateParamsPaymentMethodData.type, and stripe.SetupIntent.ModifyParamsPaymentMethodData.typebilling_policy_remote_function_response_invalid on enums stripe.Invoice.LastFinalizationError.code, stripe.PaymentIntent.LastPaymentError.code, stripe.SetupAttempt.SetupError.code, and stripe.SetupIntent.LastSetupError.codebilling_policy_remote_function_timeout on enums stripe.Invoice.LastFinalizationError.code, stripe.PaymentIntent.LastPaymentError.code, stripe.SetupAttempt.SetupError.code, and stripe.SetupIntent.LastSetupError.codebilling_policy_remote_function_unexpected_status_code on enums stripe.Invoice.LastFinalizationError.code, stripe.PaymentIntent.LastPaymentError.code, stripe.SetupAttempt.SetupError.code, and stripe.SetupIntent.LastSetupError.codebilling_policy_remote_function_unreachable on enums stripe.Invoice.LastFinalizationError.code, stripe.PaymentIntent.LastPaymentError.code, stripe.SetupAttempt.SetupError.code, and stripe.SetupIntent.LastSetupError.codeOne column per quarter.
Remove .subscription_pause from the below as the feature to pause subscription on the portal has been deprecated
2024-04-10. Please read the API Changelog and carefully review the API changes before upgrading.FinancialAccountFeaturesService.CreateParams, FinancialAccountFeaturesService.ListParams, FinancialAccountFeaturesService.create(), FinancialAccountFeaturesService.list() as Financial account features is a singleton and so should have retrieve and update methods instead of create and list methods.features to marketing_features on parameter classes stripe.Product.CreateParams and stripe.Product.ModifyParams and resource stripe.Product..subscription_pause from the below as the feature to pause subscription on the portal has been deprecated
Configuration.FeaturesConfigurationService.CreateParamsFeaturesConfigurationService.UpdateParamsFeaturesBalanceTransaction.type
obligation_inboundobligation_payoutobligation_payout_failureobligation_reversal_outboundEvent.type, WebhookEndpoint.CreateParams.enabled_events, WebhookEndpoint.ModifyParams.enabled_events, WebhookEndpointService.CreateParams.enabled_events, WebhookEndpointService.ModifyParams.enabled_events
invoiceitem.updatedorder.createdrecipient.createdrecipient.deletedrecipient.updatedsku.createdsku.deletedsku.updatedinclude_and_require for Invoice.CreateParams.pending_invoice_items_behavior and InvoiceService.CreateParams.pending_invoice_items_behaviorservice_tax for
TaxRate.RetrieveParams.tax_typeTaxRate.CreateParams.tax_typeTaxRate.ModifyParams.tax_typeTaxRateService.CreateParams.tax_typeTaxRateService.UpdateParams.tax_typeInvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_typeInvoiceLineItemService.UpdateParamsTaxAmountTaxRateData.tax_typerequest_incremental_authorization from
PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresentPaymentIntent.CreateParamsPaymentMethodOptionsCardPresentPaymentIntent.ModifyParamsPaymentMethodOptionsCardPresentPaymentIntentService.ConfirmParamsPaymentMethodOptionsCardPresentPaymentIntentService.CreateParamsPaymentMethodOptionsCardPresentPaymentIntentService.ModifyParamsPaymentMethodOptionsCardPresentid_bank_transfer, multibanco, netbanking, pay_by_bank, and upi on PaymentMethodConfigurationchallenge_only from SetupIntent.PaymentMethodOptions.Card.request_three_d_securevarious for Climate.Supplier.removal_pathwayobligation for ReportRun.CreateParamsParameters.reporting_category and ReportRunService.CreateParamsParameters.reporting_categoryrendering_options on parameter classes stripe.Invoice.CreateParams and stripe.Invoice.ModifyParams and resource stripe.Invoice. Use rendering instead.Add support for fees, losses, requirement_collection & stripe_dashboard on resource class stripe.Account.Controller
#1295 Update generated code
fees, losses, requirement_collection & stripe_dashboard on resource class stripe.Account.Controllercontroller on parameter class stripe.Account.CreateParamscreate_feature, delete_feature, list_features, retrieve_feature on resource stripe.Productstripe.ProductFeatureevent_name on parameter class stripe.billing.MeterEventAdjustment.CreateParams and resource stripe.billing.MeterEventAdjustmentcancel and type on resource stripe.billing.MeterEventAdjustmentstripe.entitlements.ActiveEntitlementstripe.entitlements.Featurenone on enum stripe.Account.type#1299 Fix README.md
#1292 Tweak changelog for python async note
Add support for risk_controls on parameter class stripe.Account.CreateParams and resource stripe.Account
risk_controls on parameter class stripe.Account.CreateParams and resource stripe.Accountpromotion_code on parameter classes stripe.Invoice.AddLinesParamsLineDiscount, stripe.Invoice.CreateParamsDiscount, stripe.Invoice.ModifyParamsDiscount, stripe.Invoice.UpdateLinesParamsLineDiscount, stripe.InvoiceItem.CreateParamsDiscount, stripe.InvoiceItem.ModifyParamsDiscount, stripe.InvoiceLineItem.ModifyParamsDiscount, stripe.Quote.CreateParamsDiscount, stripe.Quote.CreateParamsLineActionAddDiscount, stripe.Quote.CreateParamsLineItemDiscount, stripe.Quote.CreateParamsPhaseLineItemDiscount, stripe.Quote.ModifyParamsDiscount, stripe.Quote.ModifyParamsLineActionAddDiscount, stripe.Quote.ModifyParamsLineItemDiscount, and stripe.Quote.ModifyParamsPhaseLineItemDiscountzip on parameter classes stripe.PaymentMethodConfiguration.CreateParams and stripe.PaymentMethodConfiguration.ModifyParams and resource stripe.PaymentMethodConfigurationoffline on resource class stripe.SetupAttempt.PaymentMethodDetails.CardPresentcard_present on parameter classes stripe.SetupIntent.ConfirmParamsPaymentMethodOptions, stripe.SetupIntent.CreateParamsPaymentMethodOptions, and stripe.SetupIntent.ModifyParamsPaymentMethodOptions and resource class stripe.SetupIntent.PaymentMethodOptionsmodify on resource stripe.entitlements.Featureemail on resource stripe.identity.VerificationReport, parameter classes stripe.identity.VerificationSession.CreateParamsOptions and stripe.identity.VerificationSession.ModifyParamsOptions, and resource classes stripe.identity.VerificationSession.Options and stripe.identity.VerificationSession.VerifiedOutputsphone on resource stripe.identity.VerificationReport, parameter classes stripe.identity.VerificationSession.CreateParamsOptions and stripe.identity.VerificationSession.ModifyParamsOptions, and resource classes stripe.identity.VerificationSession.Options and stripe.identity.VerificationSession.VerifiedOutputsverification_flow on resources stripe.identity.VerificationReport and stripe.identity.VerificationSession and parameter class stripe.identity.VerificationSession.CreateParamsprovided_details on parameter classes stripe.identity.VerificationSession.CreateParams and stripe.identity.VerificationSession.ModifyParams and resource stripe.identity.VerificationSessionallowed_merchant_countries on parameter classes stripe.issuing.Card.CreateParamsSpendingControls, stripe.issuing.Card.ModifyParamsSpendingControls, stripe.issuing.Cardholder.CreateParamsSpendingControls, and stripe.issuing.Cardholder.ModifyParamsSpendingControls and resource classes stripe.issuing.Card.SpendingControls and stripe.issuing.Cardholder.SpendingControlsblocked_merchant_countries on parameter classes stripe.issuing.Card.CreateParamsSpendingControls, stripe.issuing.Card.ModifyParamsSpendingControls, stripe.issuing.Cardholder.CreateParamsSpendingControls, and stripe.issuing.Cardholder.ModifyParamsSpendingControls and resource classes stripe.issuing.Card.SpendingControls and stripe.issuing.Cardholder.SpendingControlsstripe.checkout.Session.CreateParamsPaymentMethodOptionsSwish from Literal['']|str to str of referenceverification_flow on enums stripe.identity.VerificationReport.type and stripe.identity.VerificationSession.typeemail_unverified_other on enum stripe.identity.VerificationSession.LastError.codeemail_verification_declined on enum stripe.identity.VerificationSession.LastError.codephone_unverified_other on enum stripe.identity.VerificationSession.LastError.codephone_verification_declined on enum stripe.identity.VerificationSession.LastError.codemobile_phone_reader on enums stripe.terminal.Reader.device_type and stripe.terminal.Reader.ListParams.device_typestripe.identity.VerificationSession.CreateParams from Literal['document', 'id_number'] to NotRequired[Literal['document', 'id_number']] of typestripe.Invoice, stripe.InvoiceLineItem, stripe.QuotePreviewInvoice, stripe.Subscription, and stripe.SubscriptionItem from Optional[List[ExpandableField[Discount]]] to List[ExpandableField[Discount]] of discountsstripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to str of datastripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to str of image_url_pngstripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to str of image_url_svgstripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to str of hosted_instructions_urlstripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to str of mobile_auth_urlstripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[QrCode] to QrCode of qr_codestripe.QuoteLine.Action.AddItem, stripe.QuoteLine.Action.SetItem, stripe.QuotePreviewSubscriptionSchedule.Phase.AddInvoiceItem, stripe.QuotePreviewSubscriptionSchedule.Phase.Item, stripe.QuotePreviewSubscriptionSchedule.Phase, stripe.SubscriptionSchedule.Phase.AddInvoiceItem, stripe.SubscriptionSchedule.Phase.Item, and stripe.SubscriptionSchedule.Phase from Optional[List[Discount]] to List[Discount] of discountscus = stripe.Customer.create(...)
#1288 Add async support to stripe-python. To use it, add an _async suffix to any request-making method.
- cus = stripe.Customer.create(...)
+ cus = await stripe.Customer.create_async(...)
See the README for detailed usage instructions. Support is provided out of the box for async requests via the HTTPX (used by default) and aiohttp libraries. For other libraries, you can also provide your own stripe.HTTPClient implementation. Please do not hesitate to open a Github issue if you have any feedback on this feature.
#1284 Update generated code
subscription_item on resource stripe.Discountpromotion_code on parameter classes stripe.Invoice.CreateParamsDiscount, stripe.Invoice.ModifyParamsDiscount, stripe.InvoiceItem.CreateParamsDiscount, stripe.InvoiceItem.ModifyParamsDiscount, stripe.InvoiceLineItem.ModifyParamsDiscount, stripe.Quote.CreateParamsDiscount, and stripe.Quote.ModifyParamsDiscountdiscounts on parameter classes stripe.Invoice.UpcomingLinesParamsSubscriptionItem, stripe.Invoice.UpcomingParamsSubscriptionItem, stripe.Quote.CreateParamsLineItem, stripe.Quote.ModifyParamsLineItem, stripe.Subscription.CreateParams, stripe.Subscription.CreateParamsAddInvoiceItem, stripe.Subscription.CreateParamsItem, stripe.Subscription.ModifyParams, stripe.Subscription.ModifyParamsAddInvoiceItem, stripe.Subscription.ModifyParamsItem, stripe.SubscriptionItem.CreateParams, stripe.SubscriptionItem.ModifyParams, stripe.SubscriptionSchedule.CreateParamsPhase, stripe.SubscriptionSchedule.CreateParamsPhaseAddInvoiceItem, stripe.SubscriptionSchedule.CreateParamsPhaseItem, stripe.SubscriptionSchedule.ModifyParamsPhase, stripe.SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItem, and stripe.SubscriptionSchedule.ModifyParamsPhaseItem, resources stripe.Subscription and stripe.SubscriptionItem, and resource classes stripe.SubscriptionSchedule.Phase.AddInvoiceItem, stripe.SubscriptionSchedule.Phase.Item, and stripe.SubscriptionSchedule.Phasezip on parameter classes stripe.PaymentMethodConfiguration.CreateParams and stripe.PaymentMethodConfiguration.ModifyParams and resource stripe.PaymentMethodConfigurationoffline on resource class stripe.SetupAttempt.PaymentMethodDetails.CardPresentcard_present on parameter classes stripe.SetupIntent.ConfirmParamsPaymentMethodOptions, stripe.SetupIntent.CreateParamsPaymentMethodOptions, and stripe.SetupIntent.ModifyParamsPaymentMethodOptions and resource class stripe.SetupIntent.PaymentMethodOptionsemail on resource stripe.identity.VerificationReport, parameter classes stripe.identity.VerificationSession.CreateParamsOptions and stripe.identity.VerificationSession.ModifyParamsOptions, and resource classes stripe.identity.VerificationSession.Options and stripe.identity.VerificationSession.VerifiedOutputsphone on resource stripe.identity.VerificationReport, parameter classes stripe.identity.VerificationSession.CreateParamsOptions and stripe.identity.VerificationSession.ModifyParamsOptions, and resource classes stripe.identity.VerificationSession.Options and stripe.identity.VerificationSession.VerifiedOutputsverification_flow on resources stripe.identity.VerificationReport and stripe.identity.VerificationSession and parameter class stripe.identity.VerificationSession.CreateParamsprovided_details on parameter classes stripe.identity.VerificationSession.CreateParams and stripe.identity.VerificationSession.ModifyParams and resource stripe.identity.VerificationSessionallowed_merchant_countries on parameter classes stripe.issuing.Card.CreateParamsSpendingControls, stripe.issuing.Card.ModifyParamsSpendingControls, stripe.issuing.Cardholder.CreateParamsSpendingControls, and stripe.issuing.Cardholder.ModifyParamsSpendingControls and resource classes stripe.issuing.Card.SpendingControls and stripe.issuing.Cardholder.SpendingControlsblocked_merchant_countries on parameter classes stripe.issuing.Card.CreateParamsSpendingControls, stripe.issuing.Card.ModifyParamsSpendingControls, stripe.issuing.Cardholder.CreateParamsSpendingControls, and stripe.issuing.Cardholder.ModifyParamsSpendingControls and resource classes stripe.issuing.Card.SpendingControls and stripe.issuing.Cardholder.SpendingControlsreference on stripe.checkout.Session.CreateParamsPaymentMethodOptionsSwish from Literal['']|str to strverification_flow on enums stripe.identity.VerificationReport.type and stripe.identity.VerificationSession.typeemail_unverified_other on enum stripe.identity.VerificationSession.LastError.codeemail_verification_declined on enum stripe.identity.VerificationSession.LastError.codephone_unverified_other on enum stripe.identity.VerificationSession.LastError.codephone_verification_declined on enum stripe.identity.VerificationSession.LastError.codemobile_phone_reader on enums stripe.terminal.Reader.device_type and stripe.terminal.Reader.ListParams.device_typetype on stripe.identity.VerificationSession.CreateParams from Literal['document', 'id_number'] to NotRequired[Literal['document', 'id_number']]discounts on stripe.Invoice and stripe.InvoiceLineItem from Optional[List[ExpandableField[Discount]]] to List[ExpandableField[Discount]]data on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to strimage_url_png on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to strimage_url_svg on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode from Optional[str] to strhosted_instructions_url on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to strmobile_auth_url on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[str] to strqr_code on stripe.PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode from Optional[QrCode] to QrCode#1289 Bump aiohttp from 3.9.0 to 3.9.2
Add support for financial_account_transactions, financial_account, issuing_card, and issuing_cards_list on AccountSession.CreateParamsComponents and A
#1277 Update generated code for beta
financial_account_transactions, financial_account, issuing_card, and issuing_cards_list on AccountSession.CreateParamsComponents and AccountSessionService.CreateParamsComponentssubscription_billing_cycle_anchor, subscription_cancel_at_period_end, subscription_cancel_at, subscription_cancel_now, subscription_default_tax_rates, subscription_items, subscription_prebilling, subscription_proration_behavior, subscription_proration_date, subscription_resume_at, subscription_start_date, and subscription_trial_end on Invoice.CreatePreviewParams and InvoiceService.CreatePreviewParams#1283 Fix unneccessary quotes
Add support for new resources Billing.MeterEventAdjustment, Billing.MeterEvent, and Billing.Meter
Billing.MeterEventAdjustment, Billing.MeterEvent, and Billing.Metercreate, deactivate, list, modify, reactivate, and retrieve methods on resource Metercreate method on resources MeterEventAdjustment and MeterEventamazon_pay_payments on Account.Capabilities, Account.CreateParamsCapabilities, Account.UpdateParamsCapabilities,AccountService.CreateParamsCapabilities, and AccountService.UpdateParamsCapabilitiesverification_failed_representative_authority on enums Account.FutureRequirements.Error.code, Account.Requirements.Errors.code, BankAccount.FutureRequirements.Error.code, BankAccount.Requirements.Errors.code, Capability.FutureRequirements.Error.code, Capability.Requirements.Errors.code, Person.FutureRequirements.Error.code, Person.Requirements.Errors.code,destination_on_behalf_of_charge_management on AccountSession.Components.PaymentDetails.Features, AccountSession.Components.Payments.Features, AccountSession.CreateParamsComponentsPaymentDetailsFeatures, AccountSession.CreateParamsComponentsPaymentsFeatures, AccountSessionService.CreateParamsComponentsPaymentDetailsFeatures and AccountSessionService.CreateParamsComponentsPaymentsFeaturesmeter on Plan.CreateParams, Plan, PlanService.CreateParams, Price.Recurring, Price.CreateParamsRecurring, Price.ListParamsRecurring, PriceService.CreateParamsRecurring, and PriceService.ListParamsRecurringmandate on Charge.PaymentMethodDetails.USBankAccount, Treasury.InboundTransfer.OriginPaymentMethodDetails.USBankAccount, Treasury.OutboundPayment.DestinationPaymentMethodDetails.USBankAccount, and Treasury.OutboundTransfer.DestinationPaymentMethodDetails.USBankAccountsecond_line on Issuing.Card.CreateParamsAdd support for new resources Entitlements.ActiveEntitlementSummary and Entitlements.ActiveEntitlement
Add support for new resources ConfirmationToken and Forwarding.Request
ConfirmationToken and Forwarding.Requestretrieve method on resource ConfirmationTokencreate, list, and retrieve methods on resource Requestmobilepay_payments on Account.Capabilities, Account.CreateParamsCapabilities, and Account.UpdateParamsCapabilitiesforwarding_api_inactive, forwarding_api_invalid_parameter, forwarding_api_upstream_connection_error, and forwarding_api_upstream_connection_timeout on enums Invoice.LastFinalizationError.code, PaymentIntent.LastPaymentError.code, SetupAttempt.SetupError.code, SetupIntent.LastSetupError.code, and StripeError.codepayment_reference on Charge.PaymentMethodDetails.UsBankAccountpayout on Treasury.ReceivedDebit.LinkedFlowsname on ConfigurationService.CreateParams, ConfigurationService.UpdateParams, and Configuration for terminalconfirmation_token on PaymentIntentService.ConfirmParams, PaymentIntentService.CreateParams, SetupIntentService.ConfirmParams, and SetupIntentService.CreateParamsmobilepay on enums Customer.ListPaymentMethodsParams.type, PaymentMethod.CreateParams.type, and PaymentMethod.ListParams.typemobilepay on Charge.PaymentMethodDetails, PaymentIntent.PaymentMethodOptions, PaymentIntentService.ConfirmParamsPaymentMethodData, PaymentIntentService.ConfirmParamsPaymentMethodOptions, PaymentIntentService.CreateParamsPaymentMethodData, PaymentIntentService.CreateParamsPaymentMethodOptions, PaymentIntentService.UpdateParamsPaymentMethodData, PaymentIntentService.UpdateParamsPaymentMethodOptions, PaymentMethod.CreateParams, PaymentMethod, SetupIntentService.ConfirmParamsPaymentMethodData, SetupIntentService.CreateParamsPaymentMethodData, and SetupIntentService.UpdateParamsPaymentMethodDatamobilepay on enums PaymentIntentService.ConfirmParamsPaymentMethodData.type, PaymentIntentService.CreateParamsPaymentMethodData.type, PaymentIntentService.UpdateParamsPaymentMethodData.type, SetupIntentService.ConfirmParamsPaymentMethodData.type, SetupIntentService.CreateParamsPaymentMethodData.type, and SetupIntentService.UpdateParamsPaymentMethodData.typemobilepay on enum PaymentMethod.typeAdd support for new resources Billing.MeterEventAdjustment, Billing.MeterEvent, and Billing.Meter
Billing.MeterEventAdjustment, Billing.MeterEvent, and Billing.Metercreate, deactivate, list, modify, reactivate, and retrieve methods on resource Metercreate method on resources MeterEventAdjustment and MeterEventcreate test helper method on resource ConfirmationTokenadd_lines, remove_lines, and update_lines methods on resource InvoiceAdd support for personalization_design on parameter classes CardService.CreateParams, CardService.ListParams, CardService.UpdateParams, stripe.issuing
personalization_design on parameter classes CardService.CreateParams, CardService.ListParams, CardService.UpdateParams, stripe.issuing.Card.CreateParams, stripe.issuing.Card.ListParams, and stripe.issuing.Card.ModifyParams and resource stripe.issuing.Cardsepa_debit on parameter classes SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptions, SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptions, stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptions, and stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptions and resource class stripe.Subscription.PaymentSettings.PaymentMethodOptionsstripe.issuing.PersonalizationDesignstripe.issuing.PhysicalBundlefloat to Literal['']|float of application_fee_percent on fields stripe.Subscription.CreateParams, stripe.Subscription.ModifyParams, SubscriptionService.UpdateParams, and SubscriptionService.CreateParamsAdd support for new value billing_period_end on enums Quote.CreateParamsLineEndsAt.type, QuoteLine.EndsAt.type, and Quote.ModifyParamsLineEndsAt.type
billing_period_end on enums Quote.CreateParamsLineEndsAt.type, QuoteLine.EndsAt.type, and Quote.ModifyParamsLineEndsAt.typeAdd support for documents on AccountSession.Components
documents on AccountSession.Componentsrequest_three_d_secure on Checkout.Session.PaymentMethodOptionsCard and Checkout.Session.CreateParams.PaymentMethodOptionsCardcreated on CreditNote.ListParamssepa_debit on Invoice.PaymentSettings.PaymentMethodOptions, InvoiceCreateParams.PaymentSettings.PaymentMethodOptions, and InvoiceUpdateParams.PaymentSettings.PaymentMethodOptionsRemove support for resource Entitlements.Event
Change identity.VerificationReport.type to be required
identity.VerificationReport.type to be requiredidentity.VerificationSession.type from Optional[Literal["document", "id_number"]] to Literal["document", "id_number"]number on Invoice.CreateParams and Invoice.ModifyParamsenable_customer_cancellation on terminal.Reader.Action.ProcessPaymentIntent.process_config, Terminal.Reader.Action.ProcessSetupIntent.process_config, Terminal.Reader.ProcessPaymentIntentParams.process_config, and Terminal.Reader.ProcessSetupIntentParams.process_configrefund_payment_config on Terminal.Reader.Action.refund_payment and Terminal.Reader.RefundPaymentParamspayment_method on Token.CreateParams.bank_accountlist_refunds and retrieve_refund methods on resource Charge.Python async - In this beta release, async support is now "feature complete". If you notice missing async support for something, it's probably a bug!
⚠️ Removes the stripe.default_http_client_async global and the stripe.HTTPClientAsync class.
#1246 Update generated code for beta
#1239 Beta: Collapse HTTPClientAsync into HTTPClient
stripe.default_http_client_async global and the stripe.HTTPClientAsync class.
stripe.default_http_client to a subclass of stripe.HTTPClient such as stripe.HTTPXClient that implements .request_async, .sleep_async, .request_stream_async, and .close_async.RequestsClient for synchronous methods, that "falls back" to a HTTPXClient when asynchronous methods are called.Add InvoiceLineItem.modify method.
InvoiceLineItem.modify method.create, retrieve, delete, and list methods on resource TaxIdinstance_url function on resource TaxId now returns the top-level /v1/tax_ids/{id} path instead of the /v1/customers/{customer}/tax_ids/{id} path.create, retrieve, delete, and list methods on resource TaxIdinstance_url function on resource TaxId now returns the top-level /v1/tax_ids/{id} path instead of the /v1/customers/{customer}/tax_ids/{id} path.InvoiceLineItem.modify method.Add support for payto and twint payment methods throughout the API
Add support for networks on Card, PaymentMethod.CreateParamsCard, PaymentMethod.ModifyParamsCard, and Token.CreateParamsCard
networks on Card, PaymentMethod.CreateParamsCard, PaymentMethod.ModifyParamsCard, and Token.CreateParamsCardno_voec on enums Checkout.Session.CustomerDetails.TaxId.type, Invoice.CustomerTaxId.type, Tax.Calculation.CustomerDetails.TaxId.type, Tax.Transaction.CustomerDetails.TaxId.type, and TaxId.typeno_voec on enums Customer.CreateParams.tax_id_data[].type, Invoice.UpcomingLinesParams.customer_details.tax_ids[].type, Invoice.UpcomingParams.customer_details.tax_ids[].type, and Tax.Calculation.CreateParams.customer_details.tax_ids[].typefinancial_connections.account.refreshed_ownership on enum Event.typedisplay_brand on PaymentMethod.cardfinancial_connections.account.refreshed_ownership on enums WebhookEndpoint.CreateParams.enabled_events[] and WebhookEndpoint.UpdateParams.enabled_events[]CreditNoteLineItem.list, CustomerCashBalanceTransaction.list, and CustomerCashBalanceTransaction.retrieve. These methods were included in the library unintentionally and never functioned.Add support for payment_method_options on ConfirmationToken
Add support for invoices on Account.Settings
invoices on Account.Settingsvelobank on various enums PaymentMethodDetails.P24.banksetup_future_usage on PaymentMethodOptions.Blikrequire_cvc_recollection on PaymentMethodOptions.Cardaccount_tax_ids on various InvoiceSettings request parametersAdd support for new resources Entitlements.Event and Entitlements.Feature
Entitlements.Event and Entitlements.Featurecreate method on resource Eventcreate and list methods on resource Featuretrio on HttpClientAsync.Add support for swish payment method throughout the API
swish payment method throughout the APIrelationship on parameter classes Account.CreateParamsIndividual and Token.CreateParamsAccountIndividualjurisdiction_level on resource TaxRatestr to Literal["offline", "online"] of status on field terminal.ReaderAdd support for create_preview method on resource Invoice
"⚠️" symbol highlights breaking changes
#1206 stripe-python v8 release
This release introduces StripeClient 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:
For full migration instructions, please refer to the v8 migration guide.
"⚠️" symbol highlights breaking changes
api_key, stripe_account, stripe_version, and idempotency_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",
)
Quote.pdf) now returns a single value of type StripeResponseStream instead of a tuple containing (StripeResponseStream, api_key).APIRequestor. 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 for APIRequestor, 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.api_version from File.create parameters. Please use stripe_version instead.util.read_special_variable() utility method (importing directly from stripe.util is deprecated as of v7.8.0)StripeError.construct_error_object(). This method was intended for internal stripe-python use only.ListObject.empty_list(). This method was intended for internal stripe-python use only.SearchResultObject.empty_search_result(). This method was intended for internal stripe-python use only.StripeObject.ReprJSONEncoder. This class was intended for internal stripe-python use only.StripeObject.api_base. This property was defunct and returned None.Add support for annual_revenue and estimated_worker_count on Account.business_profile, Account.CreateParams.business_profile, and Account.UpdateParams
annual_revenue and estimated_worker_count on Account.business_profile, Account.CreateParams.business_profile, and Account.UpdateParams.business_profileregistered_charity on enums Account.CreateParams.company.structure, Account.UpdateParams.company.structure, and Token.CreateParams.account.company.structurecollection_options on AccountLink.CreateParamsliability on Checkout.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, and checkout.Session.CreateParams.automatic_taxissuer on Checkout.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, and checkout.Session.CreateParams.invoice_creation.invoice_datainvoice_settings on PaymentLink.subscription_data, PaymentLink.CreateParams.subscription_data, PaymentLink.UpdateParams.subscription_data, and checkout.Session.CreateParams.subscription_datachallenge on enums Invoice.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, and Subscription.UpdateParams.payment_settings.payment_method_options.card.request_three_d_securepromotion_code on Invoice.UpcomingLinesParams.discounts[], Invoice.UpcomingLinesParams.invoice_items[].discounts[], Invoice.UpcomingParams.discounts[], and Invoice.UpcomingParams.invoice_items[].discounts[]account_type on PaymentMethod.UpdateParams.us_bank_accountAdd support for new value nn on enum ConfirmationToken.PaymentMethodPreview.Ideal.bank
nn on enum ConfirmationToken.PaymentMethodPreview.Ideal.bankNNBANL2G on enum ConfirmationToken.PaymentMethodPreview.Ideal.bicInvoice.AutomaticTax.liability, Invoice.issuer, and Subscription.AutomaticTax.liability to be requiredAdd support for providing details about BankAccount, Card, and CardToken on Account.CreateExternalAccountParams.external_account and Account.CreatePar
BankAccount, Card, and CardToken on Account.CreateExternalAccountParams.external_account and Account.CreateParams.external_accountnn on enums Charge.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, and SetupIntent.UpdateParamsPaymenMethodDataIdeal.bankNNBANL2G on enums Charge.PaymentMethodDetails.Ideal.bic, PaymentMethod.Ideal.bic, and SetupAttempt.PaymentMethodDetails.Ideal.bicCustomerSession.Components.buy_button and CustomerSession.Components.pricing_table to be requiredissuer on Invoice.CreateParams, Invoice.UpcomingLinesParams, Invoice.UpcomingParams, Invoice.UpdateParams, and Invoiceliability on Invoice.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, and Subscription.UpdateParams.automatic_taxon_behalf_of on Invoice.UpcomingLinesParams and Invoice.UpcomingParamspin on issuing.Card.CreateParamsrevocation_reason on Mandate.PaymentMethodDetails.bacs_debitcustomer_balance on PaymentMethodConfiguration.CreateParams, PaymentMethodConfiguration.UpdateParams, and PaymentMethodConfigurationinvoice_settings on Subscription.CreateParams and Subscription.UpdateParamsSee the changelog for more details.
Add support for new resource CustomerSession
CustomerSessioncreate method on resource CustomerSessionobligation_inbound, obligation_payout_failure, obligation_payout, and obligation_reversal_outbound from enum BalanceTransaction.typeeps and p24 on enums Invoice.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[], and SubscriptionUpdateParams.payment_settings.payment_method_types[]obligation from enum Reporting.ReportRunCreateParams.parameters.reporting_categorybilling_cycle_anchor_config on SubscriptionCreateParams and SubscriptionUpdated stable APIs to the latest version
Add support for retrieve on resource tax.Registration
retrieve on resource tax.RegistrationOptional[PaymentDetails] to PaymentDetails of payment_details on field AccountSession.ComponentsOptional[Payments] to Payments of payments on field AccountSession.ComponentsOptional[Payouts] to Payouts of payouts on field AccountSession.ComponentsOptional[Features] to Features of features on fields AccountSession.Components.PaymentDetails, AccountSession.Components.Payments, and AccountSession.Components.PayoutsOptional[InvoiceSettings] to InvoiceSettings of invoice_settings on field SubscriptionSchedule.DefaultSettingsSee the changelog for more details.
Add support for new resource FinancialConnections.Transaction
#1176 Update generated code
FinancialConnections.Transactionlist and retrieve methods on resource Transactionsubscribe and unsubscribe methods on resource FinancialConnections.Accountfeatures on AccountSessionCreateParams.components.payoutsedit_payout_schedule, instant_payouts, and standard_payouts on AccountSession.components.payouts.featuresCheckout.Session.payment_method_options.us_bank_account.financial_connections.prefetch[], Checkout.SessionCreateParams.payment_method_options.us_bank_account.financial_connections.prefetch[], Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[], InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[], InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[], PaymentIntent.payment_method_options.us_bank_account.financial_connections.prefetch[], PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections.prefetch[], PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections.prefetch[], PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections.prefetch[], SetupIntent.payment_method_options.us_bank_account.financial_connections.prefetch[], SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections.prefetch[], SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections.prefetch[], SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections.prefetch[], Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[], SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[], and SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections.prefetch[] from literal('balances') to enum('balances'|'transactions')financial_connections.account.refreshed_transactions on enum Event.typetransactions on enum FinancialConnections.AccountRefreshParams.features[]subscriptions and transaction_refresh on FinancialConnections.Accountnext_refresh_available_at on FinancialConnections.Account.balance_refreshtransactions on enums FinancialConnections.Session.prefetch[] and FinancialConnections.SessionCreateParams.prefetch[]unknown on enums Issuing.Authorization.verification_data.authentication_exemption.type and Issuing.AuthorizationCreateParams.testHelpers.verification_data.authentication_exemption.typechallenge on enums PaymentIntent.payment_method_options.card.request_three_d_secure, PaymentIntentConfirmParams.payment_method_options.card.request_three_d_secure, PaymentIntentCreateParams.payment_method_options.card.request_three_d_secure, PaymentIntentUpdateParams.payment_method_options.card.request_three_d_secure, SetupIntent.payment_method_options.card.request_three_d_secure, SetupIntentConfirmParams.payment_method_options.card.request_three_d_secure, SetupIntentCreateParams.payment_method_options.card.request_three_d_secure, and SetupIntentUpdateParams.payment_method_options.card.request_three_d_securerevolut_pay on PaymentMethodConfigurationCreateParams, PaymentMethodConfigurationUpdateParams, and PaymentMethodConfigurationQuote.invoice_settings from InvoiceSettingQuoteSetting | null to InvoiceSettingQuoteSettingdestination_details on Refundfinancial_connections.account.refreshed_transactions on enums WebhookEndpointCreateParams.enabled_events[] and WebhookEndpointUpdateParams.enabled_events[]#1185 Update generated code
#1184 Remove api_base from RequestOptions type
#1178 Support accessing reserved word resource properties via attribute
See the changelog for more details.
Reports uses of the deprecated .save in X-Stripe-Client-Telemetry. (You can disable telemetry via stripe.enable_telemetry = false, see the README.)
#1161 Update generated code
payment_method_reuse_agreement on resource classes PaymentLink.ConsentCollection and checkout.Session.ConsentCollection and parameter classes PaymentLink.CreateParamsConsentCollection and checkout.Session.CreateParamsConsentCollectionafter_submit on parameter classes PaymentLink.CreateParamsCustomText, PaymentLink.ModifyParamsCustomText, and checkout.Session.CreateParamsCustomText and resource classes PaymentLink.CustomText and checkout.Session.CustomTextcreated on parameter class radar.EarlyFraudWarning.ListParams#1146 Track usage of deprecated save
.save in X-Stripe-Client-Telemetry. (You can disable telemetry via stripe.enable_telemetry = false, see the README.)#1101 Mark defunct and internal methods as deprecated
#1169 Add more types to _http_client.py
Add support for retrieve method on resource FinancialConnections.Transaction
retrieve method on resource FinancialConnections.TransactionSee the changelog for more details.
stripe.app_infoSee the changelog for more details.
stripe.app_info, stripe.http_client, stripe.oauth, stripe.util, stripe.version, stripe.webhook, modules are deprecated. All types are available direct…
payment_details, payments, and payouts on AccountSession.components and CreateParams.componentsfeatures on AccountSession.components.account_onboarding and CreateParams.components.account_onboardingcustomer_tax_location_invalid and financial_connections_no_successful_transaction_refresh on enums Invoice.last_finalization_error.code, PaymentIntent.last_payment_error.code, SetupAttempt.setup_error.code, SetupIntent.last_setup_error.code, and StripeError.codepayment_network_reserve_hold and payment_network_reserve_release on enum BalanceTransaction.typeClimate.Product.metric_tons_available to be requiredvarious from enum Climate.Supplier.removal_pathwaychallenge_only and challenge from enum PaymentIntent.payment_method_options.card.request_three_d_secureinactive_message and restrictions on CreateParams, ModifyParams, and PaymentLinktransfer_group on PaymentLink.payment_intent_data, CreateParams.payment_intent_data, and ModifyParams.payment_intent_datatrial_settings on PaymentLink.subscription_data, CreateParams.subscription_data, and ModifyParams.subscription_datastripe.app_info, stripe.http_client, stripe.oauth, stripe.util, stripe.version, stripe.webhook, modules are deprecated. All types are available directly from stripe module now.
Before:from stripe.util import convert_to_stripe_object
# or
stripe.util.convert_to_stripe_object
After:from stripe import convert_to_stripe_object
# or
stripe.convert_to_stripe_object
stripe.api_version, stripe.multipart_data_generator, stripe.request_metrics are deprecated and will be fully removed in the future.stripe.error, stripe.stripe_object, stripe.api_requestor, stripe.stripe_response, stripe.request_options, stripe.api_resources.*, stripe.api_resources.abstract.* modules are deprecated. All types are available directly from stripe module now.
Before:from stripe.error import APIError
# or
stripe.error.APIError
After:from stripe import APIError
# or
stripe.APIError
See the changelog for more details.
Add support for new resources Climate.Order, Climate.Product, and Climate.Supplier
Climate.Order, Climate.Product, and Climate.Suppliercancel, create, list, modify, and retrieve methods on resource Orderlist and retrieve methods on resources Product and Supplierfinancial_connections_account_inactive on enums Invoice.LastFinalizationError.code, PaymentIntent.LastPaymentError.code, SetupAttempt.SetupError.code, and SetupIntent.LastSetupError.codeclimate_order_purchase and climate_order_refund on enum BalanceTransaction.typecreated on Checkout.Session.ListParamsvalidate_location on Customer.CreateParamsTax and Customer.ModifyParamsTaxclimate.order.canceled, climate.order.created, climate.order.delayed, climate.order.delivered, climate.order.product_substituted, climate.product.created, and climate.product.pricing_updated on enum Event.typechallenge on enums PaymentIntent. PaymentMethodOptions.Card.request_three_d_secure and SetupIntent. PaymentMethodOptions.Card.request_three_d_secureclimate_order_purchase and climate_order_refund on enum Reporting.ReportRun. CreateParamsParameters.reporting_categoryclimate.order.canceled, climate.order.created, climate.order.delayed, climate.order.delivered, climate.order.product_substituted, climate.product.created, and climate.product.pricing_updated on enums WebhookEndpoint.CreateParams.enabled_events[] and WebhookEndpoint.ModifyParams.enabled_events[]Rename receipient to recipient beneath PaymentDetails on Charge and PaymentIntent APIs.* Add support for electronic_commerce_indicator on resource cla
receipient to recipient beneath PaymentDetails on Charge and PaymentIntent APIs.* Add support for electronic_commerce_indicator on resource classes Charge.PaymentMethodDetails.Card.ThreeDSecure and SetupAttempt.PaymentMethodDetails.Card.ThreeDSecurecomponents on parameter class CustomerSession.CreateParams and resource CustomerSessionAdd support for electronic_commerce_indicator on resource classes Charge.PaymentMethodDetails.Card.ThreeDSecure and SetupAttempt.PaymentMethodDetails.
electronic_commerce_indicator on resource classes Charge.PaymentMethodDetails.Card.ThreeDSecure and SetupAttempt.PaymentMethodDetails.Card.ThreeDSecureexemption_indicator on resource class Charge.PaymentMethodDetails.Card.ThreeDSecuretransaction_id on resource classes Charge.PaymentMethodDetails.Card.ThreeDSecure, SetupAttempt.PaymentMethodDetails.Card.ThreeDSecure, issuing.Authorization.NetworkData, and issuing.Transaction.NetworkDataoffline on resource class Charge.PaymentMethodDetails.CardPresenttransferred_to_balance on resource CustomerCashBalanceTransactionthree_d_secure on parameter classes PaymentIntent.ConfirmParamsPaymentMethodOptionsCard, PaymentIntent.CreateParamsPaymentMethodOptionsCard, PaymentIntent.ModifyParamsPaymentMethodOptionsCard, SetupIntent.ConfirmParamsPaymentMethodOptionsCard, SetupIntent.CreateParamsPaymentMethodOptionsCard, and SetupIntent.ModifyParamsPaymentMethodOptionsCardsystem_trace_audit_number on resource class issuing.Authorization.NetworkDatanetwork_risk_score on resource classes issuing.Authorization.PendingRequest and issuing.Authorization.RequestHistoryrequested_at on resource class issuing.Authorization.RequestHistoryauthorization_code on resource class issuing.Transaction.NetworkDataAdd support for issuing_card and issuing_cards_list on AccountSession.Components
issuing_card and issuing_cards_list on AccountSession.Componentsevent_details and subscription on payment_details typesaffiliate and delivery on payment_details.flight, payment_details.lodging, and payment_details.car_rental typesdrivers on payment_details.car_rental typespassengers on payment_details.flight and payment_details.lodging typescreated on CustomerSessionAdd support for bacs_debit_payments on Account.CreateParamsSettings
bacs_debit_payments on Account.CreateParamsSettingsservice_user_number on Account.Settings.BacsDebitPaymentscapture_before on Charge.PaymentMethodDetails.Card.capture_beforePaypal on Checkout.Session.PaymentMethodOptionstax_amounts on CreditNote.CreateParamsLine, CreditNote.PreviewParamsLine, and CreditNote.PreviewLinesParamsLinenetwork_data on Issuing.Transactionstatus on Checkout.Session.ListParamsSee the changelog for more details.
Add support for new value terminal_reader_hardware_fault on enums Invoice.last_finalization_error.code, PaymentIntent.last_payment_error.code, SetupAt
terminal_reader_hardware_fault on enums Invoice.last_finalization_error.code, PaymentIntent.last_payment_error.code, SetupAttempt.setup_error.code, SetupIntent.last_setup_error.code, and StripeError.codemetadata on Quote.subscription_data, QuoteCreateParams.subscription_data, and QuoteUpdateParams.subscription_dataNone from optional param typesAdd support for attach_payment_intent method on resource Invoice
attach_payment_intent method on resource InvoiceAdd support for new resource Tax.Registration
Tax.Registrationcreate, list, and modify methods on resource RegistrationSee the changelog for more details.
Add support for new resource Margin
Margincreate, list, modify, and retrieve methods on resource MarginThis PR includes py.typed and enables inline type annotations for stripe-python package. Inline type annotations will now take precedence over Typeshe
py.typed and enable type annotations for the package
py.typed and enables inline type annotations for stripe-python package. Inline type annotations will now take precedence over Typeshed for users who use a type checker or IDE.StripeObject, instead of into generic StripeObject instances.PromotionCode.restrictions.currency_options will now deserialize into dict and not StripeObject.balance_invalid_parameter on enums Invoice.LastFinalizationError, PaymentIntent.LastPaymentError, SetupAttempt.SetupError, and SetupIntent.LastSetupErrorsave.Update pinned API version to 2023-10-16
This release changes the pinned API version to 2023-10-16. Please read the API Changelog and carefully review the API changes before upgrading stripe-
2023-10-16. Please read the API Changelog and carefully review the API changes before upgrading stripe-python.This release enables type annotations in the beta channel including types for resources, methods, properties, and parameters.
pip uninstall types-stripe).typings/stripe stubs set up in your project directorypip install types-stripe might be a quick fix. The stubs are outdated but much less opinionated so they might make unwanted type errors go away. This isn't a permanent solution however.# type: ignore.typings/stripeSee the changelog for more details.
Add support for mark_draft and mark_stale methods on resource Quote
mark_draft and mark_stale methods on resource Quotedraft_quote and mark_stale_quote methods on resource Quotepreview_invoice_lines to list_preview_invoice_lines on resource QuoteIssuing.CardDesign and Issuing.CardBundle to Issuing.PersonalizationDesign and Issuing.PhysicalBundleAdd support for new resource Issuing.Token
Issuing.Tokenlist, modify, and retrieve methods on resource TokenYour coding agent can read these notes before it upgrades. Set up the MCP server →