stripe.app_inforetrieve method on resource FinancialConnections.Transactionpayment_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
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[]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 CustomerSessionelectronic_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.NetworkDataissuing_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 CustomerSessionbacs_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.ListParamsterminal_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 typesattach_payment_intent method on resource InvoiceTax.Registrationcreate, list, and modify methods on resource RegistrationMargincreate, list, modify, and retrieve methods on resource Marginpy.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.2023-10-16. Please read the API Changelog and carefully review the API changes before upgrading stripe-python.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/stripe