stripe-python
npx @buildinternet/releases get stripe-pythonnpx @buildinternet/releases get stripe-pythonImprove webhook signature verification error messages
Stripe-Signature header, error messages help identify an incorrect signing secret or altered request body.⚠️ Omit API keys from pickled StripeObjects
StripeObject pickles no longer preserve API keys. Before making requests through an unpickled object, call reattach_api_key(api_key). This also reattaches API keys to nested objects.
See the v17 migration guide for details.
Fix stale Stripe-Account header when fetching an object related to a directly-retrieved Event
Reject header values containing CR, LF or NUL in the pycurl HTTP client
This release changes the pinned API version to 2026-10-28.endive.
#1940 Reject ASCII-whitespace-only webhook secrets
#1939 Add API v2 Search support
Adds stripe.v2.SearchResultObject[T] and support for auto pagination of search results.
#1944 Make Stripe errors serializable
Stripe exceptions can now be serialized and deserialized with Python pickle and Celery JSON result serialization without losing their type or attributes.
Replace the bundled CA certificates with Stripe's updated trusted root certificates (see https://docs.stripe.com/tls-certificates for more info). The previous bundle contained several certificates not used by Stripe, including emSign ECC Root CA - G3, whose intermediate CAs were compromised.
Preserve event context on fetched related objects
#1949 Update generated code
v2.core.vault.GbBankAccount, v2.core.vault.UsBankAccount, v2.money_management.Adjustment, v2.money_management.FinancialAccount, v2.money_management.FinancialAddressCreditSimulation, v2.money_management.FinancialAddress, v2.money_management.InboundTransfer, v2.money_management.OutboundPayment, v2.money_management.OutboundSetupIntent, v2.money_management.PayoutIntent, v2.money_management.PayoutMethod, v2.money_management.PayoutMethodsBankAccountSpec, v2.money_management.ReceivedCredit, v2.money_management.RecipientVerification, v2.money_management.TransactionEntry, and v2.money_management.Transactionacknowledge, create, recipient_verifications, and retrieve methods on resource v2.money_management.RecipientVerificationlist and retrieve methods on resources v2.money_management.Adjustment, v2.money_management.ReceivedCredit, and v2.money_management.TransactionEntrylist, modify, refresh_regulatory_receipt, and retrieve methods on resource v2.money_management.Transactioncredit method on resource v2.money_management.FinancialAddressCreditSimulationretrieve method on resource v2.money_management.PayoutMethodsBankAccountSpecarchive, list, retrieve, and unarchive methods on resource v2.money_management.PayoutMethodcancel, confirm, create, list, modify, refresh_fx_quote, refresh_recipient_verification, and retrieve methods on resource v2.money_management.PayoutIntentcancel, create, list, modify, and retrieve methods on resource v2.money_management.OutboundSetupIntentcancel, create, list, and retrieve methods on resource v2.money_management.OutboundPaymentcreate, list, and retrieve methods on resources v2.money_management.FinancialAddress and v2.money_management.InboundTransferlist, modify, and retrieve methods on resource v2.money_management.FinancialAccountarchive, confirm_microdeposits, create, list, modify, retrieve, send_microdeposits, and unarchive methods on resource v2.core.vault.UsBankAccountarchive, create, list, retrieve, and unarchive methods on resource v2.core.vault.GbBankAccountget_fund and nhil on enums Tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type, Tax.Calculation.TaxBreakdown.TaxRateDetail.tax_type, Tax.CalculationLineItem.TaxBreakdown.TaxRateDetail.tax_type, and Tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetail.tax_typereporting_chart, terminal_hardware_orders, and terminal_hardware_shop on AccountSession.Component and AccountSessionCreateParamsComponentwero_payments on Account.Capability, AccountCreateParamsCapability, and AccountModifyParamsCapabilityphysical_address on Account.Company, AccountCreateParamsCompany, AccountModifyParamsCompany, and TokenCreateParamsAccountCompanyproof_of_business_presence on AccountCreateParamsDocument and AccountModifyParamsDocumentsubscription_pause on BillingPortal.Configuration.Feature, BillingPortal.Session.Flow, billing_portal.ConfigurationCreateParamsFeature, billing_portal.ConfigurationModifyParamsFeature, and billing_portal.SessionCreateParamsFlowDatumafter_expiration on BillingPortal.Session and billing_portal.SessionCreateParamssubscription_pause on enums BillingPortal.Session.Flow.type and billing_portal.SessionCreateParamsFlowDatum.typesetup_credential_usage on Charge.PaymentMethodDetail.Card, PaymentIntent.PaymentMethodOption.Card, PaymentIntentConfirmParamsPaymentMethodOptionCard, PaymentIntentCreateParamsPaymentMethodOptionCard, PaymentIntentModifyParamsPaymentMethodOptionCard, SetupIntent.PaymentMethodOption.Card, SetupIntentConfirmParamsPaymentMethodOptionCard, SetupIntentCreateParamsPaymentMethodOptionCard, and SetupIntentModifyParamsPaymentMethodOptionCardstored_credential_usage on Charge.PaymentMethodDetail.Card, PaymentAttemptRecord.PaymentMethodDetail.Card, PaymentIntent.PaymentMethodOption.Card, PaymentIntentConfirmParamsPaymentMethodOptionCard, PaymentIntentCreateParamsPaymentMethodOptionCard, PaymentIntentModifyParamsPaymentMethodOptionCard, and PaymentRecord.PaymentMethodDetail.Cardousd on enums Charge.PaymentMethodDetail.Crypto.token_currency, PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency, and PaymentRecord.PaymentMethodDetail.Crypto.token_currencyhi-IN on enums Checkout.Session.locale and checkout.SessionCreateParams.localeaccount_tax_ids, custom_fields, description, and footer on PaymentLink.SubscriptionDatum.InvoiceSetting, PaymentLinkCreateParamsSubscriptionDatumInvoiceSetting, PaymentLinkModifyParamsSubscriptionDatumInvoiceSetting, and checkout.SessionCreateParamsSubscriptionDatumInvoiceSettingpayment_intent_data on checkout.SessionModifyParamsau_acn, au_wpn, bw_vat, ci_vat, cz_dic, fr_siren, fr_siret, fr_spi, gh_tin, is_kt, md_cf, mu_vat, mz_nuit, nz_bn, pt_nif, sm_coe, tt_bir, and tt_vat on enums Checkout.Session.CustomerDetail.TaxId.type, Invoice.CustomerTaxId.type, Tax.Calculation.CustomerDetail.TaxId.type, Tax.Transaction.CustomerDetail.TaxId.type, and TaxId.typeau_acn, au_wpn, bw_vat, ci_vat, cz_dic, fr_siren, fr_siret, fr_spi, gh_tin, is_kt, md_cf, mu_vat, mz_nuit, nz_bn, pt_nif, sm_coe, tt_bir, and tt_vat on enums CustomerCreateParamsTaxIdDatum.type, CustomerCreateTaxIdParams.type, InvoiceCreatePreviewParamsCustomerDetailTaxId.type, TaxIdCreateParams.type, and tax.CalculationCreateParamsCustomerDetailTaxId.typefednow and rtp on enum CustomerCashBalanceTransaction.Funded.BankTransfer.UsBankTransfer.networkintended_submission_method on DisputeModifyParams and Disputeappeal on Dispute.Evidence and DisputeModifyParamsEvidencesubmission_method on Dispute.EvidenceDetailappeal_needs_response and appeal_under_review on enum Dispute.statusthree_d_secure.authentication.canceled, three_d_secure.authentication.challenge_started, three_d_secure.authentication.errored, three_d_secure.authentication.failed, three_d_secure.authentication.requires_challenge, three_d_secure.authentication.requires_submission, and three_d_secure.authentication.succeeded on enum Event.typesequra on enums Invoice.PaymentSetting.payment_method_types, InvoiceCreateParamsPaymentSetting.payment_method_types, InvoiceModifyParamsPaymentSetting.payment_method_types, Subscription.PaymentSetting.payment_method_types, SubscriptionCreateParamsPaymentSetting.payment_method_types, and SubscriptionModifyParamsPaymentSetting.payment_method_typesadmissions_tax, attendance_tax, entertainment_tax, get_fund, gross_receipts_tax, hospitality_tax, luxury_tax, nhil, resort_tax, and tourism_tax on enums InvoiceAddLinesParamsLineTaxAmountTaxRateDatum.tax_type, InvoiceLineItemModifyParamsTaxAmountTaxRateDatum.tax_type, InvoiceUpdateLinesParamsLineTaxAmountTaxRateDatum.tax_type, TaxRate.tax_type, TaxRateCreateParams.tax_type, and TaxRateModifyParams.tax_typepause_schedules on InvoiceCreatePreviewParamsScheduleDetailfinancial_account on issuing.CardModifyParamsdelivered_at and shipped_at on Issuing.Card.Shippingscalapay on enums PaymentLink.payment_method_types, PaymentLinkCreateParams.payment_method_types, and PaymentLinkModifyParams.payment_method_typesreference_status and reference on Refund.DestinationDetail.AfterpayClearpay, Refund.DestinationDetail.Klarna, and Refund.DestinationDetail.PaypalSubscriptionSchedule.pause_schedules to be requiredbw, ci, gh, and mu on Tax.Registration.CountryOption and tax.RegistrationCreateParamsCountryOptionutility_users_tax on Tax.Registration.CountryOption.Me and tax.RegistrationCreateParamsCountryOptionMedigital_excise_tax and utility_users_tax on enums Tax.Registration.CountryOption.Me.type and tax.RegistrationCreateParamsCountryOptionMe.typereader_security and stripe_t600 on Terminal.Configuration, terminal.ConfigurationCreateParams, and terminal.ConfigurationModifyParamssimulated_stripe_t600 and stripe_t600 on enums Terminal.Reader.device_type and terminal.ReaderListParams.device_typethree_d_secure.authentication.canceled, three_d_secure.authentication.challenge_started, three_d_secure.authentication.errored, three_d_secure.authentication.failed, three_d_secure.authentication.requires_challenge, three_d_secure.authentication.requires_submission, and three_d_secure.authentication.succeeded on enums WebhookEndpointCreateParams.enabled_events and WebhookEndpointModifyParams.enabled_events2026-10-28.endive on enum WebhookEndpointCreateParams.api_versionbank_accounts and cards on V2.Core.Account.Configuration.Recipient.Capability, v2.core.AccountCreateParamsConfigurationRecipientCapability, and v2.core.AccountModifyParamsConfigurationRecipientCapabilitypayout_methods on V2.Core.Account.Default and v2.core.AccountModifyParamsDefaultalternatives on V2.Core.Account.FutureRequirement and V2.Core.Account.Requirementbank_accounts.ach, bank_accounts.fedwire, bank_accounts.fps, bank_accounts.rtp, bank_accounts.sepa, and bank_accounts.swift on enums V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability and V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capabilitycustomer and subscription on EventsV1InvoiceUpcomingEventbank_accounts.ach, bank_accounts.fedwire, bank_accounts.fps, bank_accounts.rtp, bank_accounts.sepa, and bank_accounts.swift on enum EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capabilitythree_d_secure.authentication.canceled, three_d_secure.authentication.challenge_started, three_d_secure.authentication.errored, three_d_secure.authentication.failed, three_d_secure.authentication.requires_challenge, three_d_secure.authentication.requires_submission, and three_d_secure.authentication.succeeded with resource three_d_secure.AuthenticationV1CustomerDiscountSourceChangedEvent, V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent, and V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventV1CustomerSubscriptionActiveEvent, V1CustomerSubscriptionCancelAtChangedEvent, V1CustomerSubscriptionDefaultPaymentMethodChangedEvent, V1CustomerSubscriptionIncompleteEvent, V1CustomerSubscriptionIncompleteExpiredEvent, V1CustomerSubscriptionItemAddedEvent, V1CustomerSubscriptionItemPriceChangedEvent, V1CustomerSubscriptionItemQuantityChangedEvent, V1CustomerSubscriptionItemRemovedEvent, V1CustomerSubscriptionItemTaxRatesChangedEvent, V1CustomerSubscriptionPastDueEvent, V1CustomerSubscriptionTrialingEvent, and V1CustomerSubscriptionUnpaidEvent with related object SubscriptionV1FinancialConnectionsAccountBalanceRefreshFailedEvent, V1FinancialConnectionsAccountBalanceRefreshSucceededEvent, V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent, V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent, V1FinancialConnectionsAccountOwnershipRefreshFailedEvent, V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent, V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent, V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent, V1FinancialConnectionsAccountTransactionsRefreshFailedEvent, and V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent with related object financial_connections.AccountV1InvoiceDiscountAddedEvent, V1InvoiceDiscountRemovedEvent, V1InvoiceLineItemAddedEvent, V1InvoiceLineItemPricingChangedEvent, V1InvoiceLineItemQuantityChangedEvent, and V1InvoiceLineItemRemovedEvent with related object InvoiceV1InvoicePaymentCanceledEvent and V1InvoicePaymentOpenEvent with related object InvoicePaymentV1InvoiceitemAmountChangedEvent, V1InvoiceitemDiscountAddedEvent, and V1InvoiceitemDiscountRemovedEvent with related object InvoiceItemV1PriceActivatedEvent, V1PriceDeactivatedEvent, V1PriceLookupKeyChangedEvent, and V1PriceTaxBehaviorChangedEvent with related object PriceV1ProductActivatedEvent, V1ProductDeactivatedEvent, V1ProductDefaultPriceChangedEvent, and V1ProductTaxCodeChangedEvent with related object ProductV1PromotionCodeFullyRedeemedEvent with related object PromotionCodeV1SubscriptionSchedulePhaseAddedEvent, V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent, V1SubscriptionSchedulePhaseEndDateChangedEvent, V1SubscriptionSchedulePhaseRemovedEvent, and V1SubscriptionSchedulePhaseTrialEndChangedEvent with related object SubscriptionScheduleV2MoneyManagementAdjustmentCreatedEvent with related object v2.money_management.AdjustmentV2MoneyManagementFinancialAccountCreatedEvent and V2MoneyManagementFinancialAccountUpdatedEvent with related object v2.money_management.FinancialAccountV2MoneyManagementFinancialAddressActivatedEvent and V2MoneyManagementFinancialAddressFailedEvent with related object v2.money_management.FinancialAddressV2MoneyManagementInboundTransferAvailableEvent, V2MoneyManagementInboundTransferBankDebitFailedEvent, V2MoneyManagementInboundTransferBankDebitProcessingEvent, V2MoneyManagementInboundTransferBankDebitQueuedEvent, V2MoneyManagementInboundTransferBankDebitReturnedEvent, and V2MoneyManagementInboundTransferBankDebitSucceededEvent with related object v2.money_management.InboundTransferV2MoneyManagementOutboundPaymentCanceledEvent, V2MoneyManagementOutboundPaymentCreatedEvent, V2MoneyManagementOutboundPaymentFailedEvent, V2MoneyManagementOutboundPaymentPostedEvent, V2MoneyManagementOutboundPaymentReturnedEvent, V2MoneyManagementOutboundPaymentUnderReviewEvent, and V2MoneyManagementOutboundPaymentUpdatedEvent with related object v2.money_management.OutboundPaymentV2MoneyManagementPayoutIntentCanceledEvent, V2MoneyManagementPayoutIntentCreatedEvent, V2MoneyManagementPayoutIntentPendingEvent, V2MoneyManagementPayoutIntentPostedEvent, V2MoneyManagementPayoutIntentProcessingEvent, V2MoneyManagementPayoutIntentRequiresActionEvent, and V2MoneyManagementPayoutIntentUpdatedEvent with related object v2.money_management.PayoutIntentV2MoneyManagementPayoutMethodCreatedEvent and V2MoneyManagementPayoutMethodUpdatedEvent with related object v2.money_management.PayoutMethodV2MoneyManagementReceivedCreditAvailableEvent, V2MoneyManagementReceivedCreditFailedEvent, V2MoneyManagementReceivedCreditReturnedEvent, and V2MoneyManagementReceivedCreditSucceededEvent with related object v2.money_management.ReceivedCreditV2MoneyManagementRecipientVerificationCreatedEvent and V2MoneyManagementRecipientVerificationUpdatedEvent with related object v2.money_management.RecipientVerificationV2MoneyManagementTransactionCreatedEvent and V2MoneyManagementTransactionUpdatedEvent with related object v2.money_management.TransactionAlreadyCanceledError, BlockedByStripeError, CannotProceedError, CapabilityNotEnabledError, ControlledByAlternateResourceError, FeatureNotEnabledError, FinancialAccountNotOpenError, FxQuoteNeedsRefreshError, InsufficientFundsError, InvalidPaymentMethodError, InvalidPayoutMethodError, InvalidVaultedCredentialError, NotCancelableError, QuotaExceededError, RecipientNotNotifiableError, VerificationAttemptFailedError, VerificationExpiredError, and VerificationNotInitiatedErrorsmart_disputes_not_available, subscription_update_trial_after_billing_cycle_anchor, three_d_secure_authentication_not_supported, and three_d_secure_authentication_upstream_error on Invoice.LastFinalizationError, PaymentIntent.LastPaymentError, SetupAttempt.SetupError, SetupIntent.LastSetupError, StripeError, and Terminal.Reader.Action.ApiError