diff --git a/.hark/changes/2026-09-11_xavdid_singleton-related-object.change.md b/.hark/changes/2026-09-11_xavdid_singleton-related-object.change.md new file mode 100644 index 000000000..74f5109ab --- /dev/null +++ b/.hark/changes/2026-09-11_xavdid_singleton-related-object.change.md @@ -0,0 +1,7 @@ +--- +title: Support `EventNotification`s with singleton related objects +pr_url: https://github.com/stripe/stripe-python/pull/1904 +jira_tickets_closed: +- RUN_DEVSDK-2825 +released_in_version: 16.0.0 +--- diff --git a/.hark/changes/2026-09-15_zacchua_add-stripe-suppress-notices.change.md b/.hark/changes/2026-09-15_zacchua_add-stripe-suppress-notices.change.md new file mode 100644 index 000000000..f4c73dbf9 --- /dev/null +++ b/.hark/changes/2026-09-15_zacchua_add-stripe-suppress-notices.change.md @@ -0,0 +1,8 @@ +--- +title: Allow suppressing Stripe notices +pr_url: https://github.com/stripe/stripe-python/pull/1909 +semver_level: minor +released_in_version: 16.0.0 +--- + +Set the `STRIPE_SUPPRESS_NOTICES` environment variable to `true` to suppress Stripe notices in test and sandbox environments when not running under a detected AI agent. Notices remain enabled by default and continue to be shown to AI agents. diff --git a/.hark/changes/2026-09-16_zacchua_fix-event-handler-account-scoping.change.md b/.hark/changes/2026-09-16_zacchua_fix-event-handler-account-scoping.change.md new file mode 100644 index 000000000..0e4ed377a --- /dev/null +++ b/.hark/changes/2026-09-16_zacchua_fix-event-handler-account-scoping.change.md @@ -0,0 +1,9 @@ +--- +title: Fix account scoping for event notification handler callback clients +pr_url: https://github.com/stripe/stripe-python/pull/1911 +semver_level: patch +released_in_version: 16.0.0 +--- + +- Fix callback clients to use the event's Stripe context and preserve the original client's non-account configuration. +- Fix API errors when using an event notification handler with a client configured with a Stripe account. diff --git a/.hark/changes/2026-09-17_zacchua_remove-deprecated-stripeobject-request.change.md b/.hark/changes/2026-09-17_zacchua_remove-deprecated-stripeobject-request.change.md new file mode 100644 index 000000000..2a7a51690 --- /dev/null +++ b/.hark/changes/2026-09-17_zacchua_remove-deprecated-stripeobject-request.change.md @@ -0,0 +1,8 @@ +--- +title: Remove deprecated `StripeObject.request()` method +pr_url: https://github.com/stripe/stripe-python/pull/1914 +semver_level: major +released_in_version: 16.0.0 +--- + +The deprecated `StripeObject.request()` method has been removed. Use `StripeClient.raw_request()` to make custom API requests. diff --git a/.hark/changes/2026-09-17_zacchua_rename-reversal-transferreversal.change.md b/.hark/changes/2026-09-17_zacchua_rename-reversal-transferreversal.change.md new file mode 100644 index 000000000..83abf25d3 --- /dev/null +++ b/.hark/changes/2026-09-17_zacchua_rename-reversal-transferreversal.change.md @@ -0,0 +1,8 @@ +--- +title: Rename `stripe.Reversal` to `stripe.TransferReversal` +pr_url: https://github.com/stripe/stripe-python/pull/1915 +semver_level: major +released_in_version: 16.0.0 +--- + +- ⚠️ Rename the `stripe.Reversal` resource class to `stripe.TransferReversal`. Update references and type annotations to use `stripe.TransferReversal`. diff --git a/.hark/changes/2026-09-18_markisaackogan_mark-path-params-as-positional-only.change.md b/.hark/changes/2026-09-18_markisaackogan_mark-path-params-as-positional-only.change.md new file mode 100644 index 000000000..a8ddd5061 --- /dev/null +++ b/.hark/changes/2026-09-18_markisaackogan_mark-path-params-as-positional-only.change.md @@ -0,0 +1,10 @@ +--- +title: Make path parameters positional-only in all service methods +pr_url: https://github.com/stripe/stripe-python/pull/1920 +semver_level: major +released_in_version: 16.0.0 +--- + +Path parameters must now be passed positionally to service methods. Passing them by keyword is no longer supported. This prevents parameter names derived from the API specification from becoming part of the public interface. + + Resource methods are unaffected by this change. diff --git a/.hark/changes/2026-09-23_markisaackogan_mark-overloaded-params-as-positional-only.change.md b/.hark/changes/2026-09-23_markisaackogan_mark-overloaded-params-as-positional-only.change.md new file mode 100644 index 000000000..e466fb62d --- /dev/null +++ b/.hark/changes/2026-09-23_markisaackogan_mark-overloaded-params-as-positional-only.change.md @@ -0,0 +1,8 @@ +--- +title: Make path parameters positional-only in all service methods +pr_url: https://github.com/stripe/stripe-python/pull/1924 +semver_level: major +released_in_version: 16.0.0 +--- + +Path parameters must now be passed positionally on resource methods that support both classmethod and instance-method call styles (e.g. Coupon.delete). Passing them by keyword is no longer supported. diff --git a/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md b/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md new file mode 100644 index 000000000..aa2f28c75 --- /dev/null +++ b/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md @@ -0,0 +1,160 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1899 +semver_level: major +is_stripe_api_change: true +released_in_version: 16.0.0 +--- + +* Add support for new resources `apps.Install`, `product_catalog.TrialOffer`, `tax.Location`, and `three_d_secure.Authentication` +* Add support for `create`, `list`, `modify`, `retrieve`, and `uninstall` methods on resource `apps.Install` +* Add support for `create`, `list`, `modify`, and `retrieve` methods on resource `product_catalog.TrialOffer` +* Add support for `create`, `list`, and `retrieve` methods on resource `tax.Location` +* Add support for `cancel`, `create`, `list`, `retrieve`, and `submit` methods on resource `three_d_secure.Authentication` +* Add support for `pause` method on resource `Subscription` +* ⚠️ Add support for new values `invalid_address_cmra_address` and `invalid_address_registered_agent_address` on enums `Account.FutureRequirement.Error.code`, `Account.Requirement.Error.code`, `BankAccount.FutureRequirement.Error.code`, `BankAccount.Requirement.Error.code`, `Capability.FutureRequirement.Error.code`, `Capability.Requirement.Error.code`, `Person.FutureRequirement.Error.code`, and `Person.Requirement.Error.code` +* Add support for `performance_location` on `Tax.CalculationLineItem` and `tax.CalculationCreateParamsLineItem` +* Add support for new value `performance` on enums `Tax.Calculation.ShippingCost.TaxBreakdown.sourcing`, `Tax.CalculationLineItem.TaxBreakdown.sourcing`, and `Tax.Transaction.ShippingCost.TaxBreakdown.sourcing` +* Add support for new values `admissions_tax`, `attendance_tax`, `digital_excise_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `recycling_fee`, `resort_tax`, `tourism_tax`, and `utility_users_tax` 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_type` +* Add support for `destination` on `Reserve.Hold`, `Reserve.Plan`, and `Reserve.Release` +* Add support for `manual_release` on `Reserve.Plan` +* ⚠️ Add support for new value `other` on enum `Reserve.Plan.status` +* ⚠️ Add support for new values `manual_release` and `other` on enum `Reserve.Plan.type` +* ⚠️ Add support for new value `hold_expired` on enum `Reserve.Release.reason` +* ⚠️ Remove support for value `bulk_hold_expiry` from enum `Reserve.Release.reason` +* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile` +* Add support for `blik_recurring_payments` and `sequra_payments` on `Account.Capability`, `AccountCreateParamsCapability`, `AccountModifyParamsCapability`, `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` +* Add support for `paypay_payments` on `Account.Capability`, `Account.Setting`, `AccountCreateParamsCapability`, `AccountCreateParamsSetting`, `AccountModifyParamsCapability`, and `AccountModifyParamsSetting` +* Add support for `sepa_debit_payments` on `AccountCreateParamsSetting`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant` +* ⚠️ Change type of `AccountRejectParams.reason` from `string` to `enum` +* Add support for new values `issuing_dispute_provisional_credit_reversal` and `issuing_dispute_provisional_credit` on enum `BalanceTransaction.type` +* Add support for `paypay` on `Charge.PaymentMethodDetail`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, and `SetupIntentModifyParamsPaymentMethodDatum` +* Add support for `sequra` on `Charge.PaymentMethodDetail`, `Checkout.Session.PaymentMethodOption`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, `SetupIntentModifyParamsPaymentMethodDatum`, and `checkout.SessionCreateParamsPaymentMethodOption` +* Add support for `electronic_commerce_indicator` on `Charge.PaymentMethodDetail.Card` +* ⚠️ Change type of `Charge.PaymentMethodDetail.Card.mandate` from `string` to `expandable($Mandate)` +* Add support for `allowed_payment_method_types` on `Checkout.Session` and `checkout.SessionCreateParams` +* ⚠️ Remove support for `payment_method_types` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentModifyParams`, `SetupIntentCreateParams`, `SetupIntentModifyParams`, and `checkout.SessionCreateParams` +* Add support for new values `paypay` and `sequra` on enums `PaymentIntent.excluded_payment_method_types`, `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentModifyParams.excluded_payment_method_types`, `SetupIntent.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, `SetupIntentModifyParams.excluded_payment_method_types`, and `checkout.SessionCreateParams.excluded_payment_method_types` +* Add support for `tax_details` on `InvoiceAddLinesParamsLinePriceDatumProductDatum`, `InvoiceLineItemModifyParamsPriceDatumProductDatum`, `InvoiceUpdateLinesParamsLinePriceDatumProductDatum`, `PaymentLinkCreateParamsLineItemPriceDatumProductDatum`, `PlanCreateParamsProduct`, `PriceCreateParamsProductDatum`, `ProductCreateParams`, `ProductModifyParams`, `Product`, `checkout.SessionCreateParamsLineItemPriceDatumProductDatum`, and `checkout.SessionModifyParamsLineItemPriceDatumProductDatum` +* Add support for `blik` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Mandate.PaymentMethodDetail`, `SetupAttempt.PaymentMethodDetail`, `SetupIntent.PaymentMethodOption`, `SetupIntentConfirmParamsPaymentMethodOption`, `SetupIntentCreateParamsPaymentMethodOption`, `SetupIntentModifyParamsPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, `SubscriptionModifyParamsPaymentSettingPaymentMethodOption`, and `checkout.SessionCreateParamsPaymentMethodOption` +* Change type of `PaymentIntentConfirmParamsPaymentMethodOptionBlik.setup_future_usage`, `PaymentIntentCreateParamsPaymentMethodOptionBlik.setup_future_usage`, `PaymentIntentModifyParamsPaymentMethodOptionBlik.setup_future_usage`, and `checkout.SessionCreateParamsPaymentMethodOptionBancontact.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` +* ⚠️ Change type of `Checkout.Session.PaymentMethodOption.Bancontact.setup_future_usage` and `PaymentIntent.PaymentMethodOption.Blik.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` +* Add support for new values `paypay` and `sequra` on enums `ConfirmationTokenCreateParamsPaymentMethodDatum.type`, `PaymentIntentConfirmParamsPaymentMethodDatum.type`, `PaymentIntentCreateParamsPaymentMethodDatum.type`, `PaymentIntentModifyParamsPaymentMethodDatum.type`, `SetupIntentConfirmParamsPaymentMethodDatum.type`, `SetupIntentCreateParamsPaymentMethodDatum.type`, and `SetupIntentModifyParamsPaymentMethodDatum.type` +* Add support for new values `paypay` and `sequra` on enums `ConfirmationToken.PaymentMethodPreview.type` and `PaymentMethod.type` +* Add support for new values `paypay` and `sequra` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` +* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enum `Event.type` +* Add support for new values `expired` and `pending` on enum `FinancialConnections.Account.AccountNumber.status` +* Add support for `country` on `financial_connections.SessionCreateParamsFilter` +* ⚠️ Remove support for `countries` on `FinancialConnections.Session.Filter` and `financial_connections.SessionCreateParamsFilter` +* Add support for `invoicing_rules` on `InvoiceItemModifyParams` and `InvoiceItem` +* Add support for `company_details` on `Invoice.PaymentSetting.PaymentMethodOption.Billie`, `InvoiceCreateParamsPaymentSettingPaymentMethodOptionBillie`, `InvoiceModifyParamsPaymentSettingPaymentMethodOptionBillie`, `PaymentIntent.PaymentMethodOption.Billie`, `PaymentIntentConfirmParamsPaymentMethodOptionBillie`, `PaymentIntentCreateParamsPaymentMethodOptionBillie`, `PaymentIntentModifyParamsPaymentMethodOptionBillie`, `Subscription.PaymentSetting.PaymentMethodOption.Billie`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOptionBillie`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOptionBillie` +* Add support for `reference` on `Invoice.PaymentSetting.PaymentMethodOption.Billie`, `InvoiceCreateParamsPaymentSettingPaymentMethodOptionBillie`, `InvoiceModifyParamsPaymentSettingPaymentMethodOptionBillie`, `PaymentIntent.PaymentMethodOption.Billie`, `PaymentIntentConfirmParamsPaymentMethodOptionBillie`, `PaymentIntentCreateParamsPaymentMethodOptionBillie`, and `PaymentIntentModifyParamsPaymentMethodOptionBillie` +* Add support for new value `blik` 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_types` +* Add support for new values `digital_excise_tax` and `utility_users_tax` on enums `InvoiceAddLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `InvoiceLineItemModifyParamsTaxAmountTaxRateDatum.tax_type`, `InvoiceUpdateLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `TaxRate.tax_type`, `TaxRateCreateParams.tax_type`, and `TaxRateModifyParams.tax_type` +* Add support for `pause` on `InvoiceCreatePreviewParamsSubscriptionDetail` +* ⚠️ Change type of `InvoiceCreatePreviewParamsSubscriptionDetail.billing_cycle_anchor` from `enum('now'|'unchanged') | DateTime` to `billing_cycle_anchor_param` +* Add support for `current_trial` on `InvoiceCreatePreviewParamsSubscriptionDetailItem`, `SubscriptionCreateParamsItem`, `SubscriptionItemCreateParams`, `SubscriptionItemModifyParams`, `SubscriptionItem`, and `SubscriptionModifyParamsItem` +* Add support for `status_details` on `Invoice` and `Subscription` +* Add support for `india` on `Mandate.PaymentMethodDetail.Card` +* Add support for `momo` on `PaymentAttemptRecord.PaymentMethodDetail` and `PaymentRecord.PaymentMethodDetail` +* Add support for new values `2.3.0` and `2.3.1` on enums `PaymentAttemptRecord.PaymentMethodDetail.Card.ThreeDSecure.version` and `PaymentRecord.PaymentMethodDetail.Card.ThreeDSecure.version` +* Add support for `link` on `PaymentAttemptRecord.PaymentMethodDetail.Card.Wallet` and `PaymentRecord.PaymentMethodDetail.Card.Wallet` +* Add support for `funding_source_group` on `PaymentAttemptRecord.PaymentMethodDetail.Link` and `PaymentRecord.PaymentMethodDetail.Link` +* Add support for new values `card_present` and `interac_present` on enums `PaymentIntent.allowed_payment_method_types`, `PaymentIntentConfirmParams.allowed_payment_method_types`, `PaymentIntentCreateParams.allowed_payment_method_types`, `PaymentIntentModifyParams.allowed_payment_method_types`, `SetupIntent.allowed_payment_method_types`, `SetupIntentConfirmParams.allowed_payment_method_types`, `SetupIntentCreateParams.allowed_payment_method_types`, and `SetupIntentModifyParams.allowed_payment_method_types` +* Add support for `mandate_options` on `PaymentIntent.PaymentMethodOption.Blik`, `PaymentIntentConfirmParamsPaymentMethodOptionBlik`, `PaymentIntentCreateParamsPaymentMethodOptionBlik`, and `PaymentIntentModifyParamsPaymentMethodOptionBlik` +* Add support for `payment_record` on `PaymentIntent` +* Add support for `expires_at` on `PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode` +* Add support for new values `paypay` and `sequra` on enums `PaymentLink.payment_method_types`, `PaymentLinkCreateParams.payment_method_types`, and `PaymentLinkModifyParams.payment_method_types` +* ⚠️ Remove support for `payto` on `PaymentMethodModifyParams` +* Add support for `canceled` on `PaymentRecordReportPaymentAttemptParams` and `PaymentRecordReportPaymentParams` +* Add support for new value `canceled` on enums `PaymentRecordReportPaymentAttemptParams.outcome` and `PaymentRecordReportPaymentParams.outcome` +* Add support for new value `rerouted` on enum `Radar.PaymentEvaluation.Outcome.type` +* Add support for `early_fraud_warning` and `fraudulent_dispute` on `Radar.PaymentEvaluation.Signal` +* ⚠️ Change type of `Radar.PaymentEvaluation.Signal.FraudulentPayment.score` from `number` to `nullable(number)` +* Add support for `pause_schedules` on `SubscriptionScheduleCreateParams`, `SubscriptionScheduleModifyParams`, and `SubscriptionSchedule` +* ⚠️ Change type of `SubscriptionModifyParams.billing_cycle_anchor` and `SubscriptionResumeParams.billing_cycle_anchor` from `enum('now'|'unchanged')` to `billing_cycle_anchor_param` +* Add support for `billing_cycle_anchor` on `Subscription.TrialSetting.EndBehavior`, `SubscriptionCreateParamsTrialSettingEndBehavior`, and `SubscriptionModifyParamsTrialSettingEndBehavior` +* Change `SubscriptionCreateParamsTrialSettingEndBehavior.missing_payment_method` and `SubscriptionModifyParamsTrialSettingEndBehavior.missing_payment_method` to be optional +* Add support for `payment_behavior` on `SubscriptionResumeParams` +* Add support for `cancel_at_period_end` on `Subscription.PendingUpdate` +* ⚠️ Remove support for `igic` on `Tax.Registration.CountryOption.At`, `Tax.Registration.CountryOption.Be`, `Tax.Registration.CountryOption.Bg`, `Tax.Registration.CountryOption.Cy`, `Tax.Registration.CountryOption.Cz`, `Tax.Registration.CountryOption.De`, `Tax.Registration.CountryOption.Dk`, `Tax.Registration.CountryOption.E`, `Tax.Registration.CountryOption.Ee`, `Tax.Registration.CountryOption.Fi`, `Tax.Registration.CountryOption.Fr`, `Tax.Registration.CountryOption.Gr`, `Tax.Registration.CountryOption.Hr`, `Tax.Registration.CountryOption.Hu`, `Tax.Registration.CountryOption.Ie`, `Tax.Registration.CountryOption.It`, `Tax.Registration.CountryOption.Lt`, `Tax.Registration.CountryOption.Lu`, `Tax.Registration.CountryOption.Lv`, `Tax.Registration.CountryOption.Mt`, `Tax.Registration.CountryOption.Nl`, `Tax.Registration.CountryOption.Pl`, `Tax.Registration.CountryOption.Pt`, `Tax.Registration.CountryOption.Ro`, `Tax.Registration.CountryOption.Se`, `Tax.Registration.CountryOption.Si`, `Tax.Registration.CountryOption.Sk`, `tax.RegistrationCreateParamsCountryOptionAt`, `tax.RegistrationCreateParamsCountryOptionBe`, `tax.RegistrationCreateParamsCountryOptionBg`, `tax.RegistrationCreateParamsCountryOptionCy`, `tax.RegistrationCreateParamsCountryOptionCz`, `tax.RegistrationCreateParamsCountryOptionDe`, `tax.RegistrationCreateParamsCountryOptionDk`, `tax.RegistrationCreateParamsCountryOptionE`, `tax.RegistrationCreateParamsCountryOptionEe`, `tax.RegistrationCreateParamsCountryOptionFi`, `tax.RegistrationCreateParamsCountryOptionFr`, `tax.RegistrationCreateParamsCountryOptionGr`, `tax.RegistrationCreateParamsCountryOptionHr`, `tax.RegistrationCreateParamsCountryOptionHu`, `tax.RegistrationCreateParamsCountryOptionIe`, `tax.RegistrationCreateParamsCountryOptionIt`, `tax.RegistrationCreateParamsCountryOptionLt`, `tax.RegistrationCreateParamsCountryOptionLu`, `tax.RegistrationCreateParamsCountryOptionLv`, `tax.RegistrationCreateParamsCountryOptionMt`, `tax.RegistrationCreateParamsCountryOptionNl`, `tax.RegistrationCreateParamsCountryOptionPl`, `tax.RegistrationCreateParamsCountryOptionPt`, `tax.RegistrationCreateParamsCountryOptionRo`, `tax.RegistrationCreateParamsCountryOptionSe`, `tax.RegistrationCreateParamsCountryOptionSi`, and `tax.RegistrationCreateParamsCountryOptionSk` +* Add support for `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on `Tax.Registration.CountryOption.Me` and `tax.RegistrationCreateParamsCountryOptionMe` +* Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on enums `Tax.Registration.CountryOption.Me.type` and `tax.RegistrationCreateParamsCountryOptionMe.type` +* Add support for `requirements` on `TaxCode` +* Add support for new value `rtp` on enum `Treasury.FinancialAccount.FinancialAddress.supported_networks` +* Add support for new value `rtp` on enum `treasury.ReceivedCreditCreateParams.network` +* Add support for new value `rtp` on enum `Treasury.ReceivedCredit.network` +* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointModifyParams.enabled_events` +* Add support for new value `2026-09-30.endive` on enum `WebhookEndpointCreateParams.api_version` +* ⚠️ Remove support for `configurations` on `V2.Core.AccountLink.UseCase.AccountOnboarding`, `V2.Core.AccountLink.UseCase.AccountUpdate`, `v2.core.AccountLinkCreateParamsUseCaseAccountOnboarding`, and `v2.core.AccountLinkCreateParamsUseCaseAccountUpdate` +* ⚠️ Add support for new value `rejected` on enums `V2.Core.Account.Configuration.Customer.Capability.AutomaticIndirectTax.status`, `V2.Core.Account.Configuration.Merchant.Capability.AchDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AcssDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AffirmPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AfterpayClearpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AlmaPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AmazonPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AuBecsDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BacsDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BancontactPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BlikPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BoletoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CardPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CartesBancairesPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CashappPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.EpsPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.FpxPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.GbBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.GrabpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.IdealPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.JcbPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.JpBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KakaoPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KlarnaPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KonbiniPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KrCardPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.LinkPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MobilepayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MultibancoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MxBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.NaverPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.OxxoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.P24Payment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PayByBankPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PaycoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PaynowPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PromptpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.RevolutPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SamsungPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SepaBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SepaDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.StripeBalance.Payout.status`, `V2.Core.Account.Configuration.Merchant.Capability.SunbitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SwishPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.TwintPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.UsBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.ZipPayment.status`, `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.Payout.status`, and `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.StripeTransfer.status` +* ⚠️ Add support for new values `rejected_fraud`, `rejected_incomplete_verification`, `rejected_listed`, `rejected_other`, `rejected_platform_fraud`, `rejected_platform_other`, `rejected_platform_terms_of_service`, and `rejected_terms_of_service` on enums `V2.Core.Account.Configuration.Customer.Capability.AutomaticIndirectTax.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AchDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AcssDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AffirmPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AfterpayClearpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AlmaPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AmazonPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AuBecsDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BacsDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BancontactPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BlikPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BoletoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CardPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CartesBancairesPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CashappPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.EpsPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.FpxPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.GbBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.GrabpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.IdealPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.JcbPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.JpBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KakaoPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KlarnaPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KonbiniPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KrCardPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.LinkPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MobilepayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MultibancoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MxBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.NaverPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.OxxoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.P24Payment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PayByBankPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PaycoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PaynowPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PromptpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.RevolutPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SamsungPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SepaBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SepaDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.StripeBalance.Payout.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SunbitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SwishPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.TwintPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.UsBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.ZipPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.Payout.StatusDetail.code`, and `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.StripeTransfer.StatusDetail.code` +* Add support for `satispay_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` +* Add support for new values `invalid_address_cmra_address` and `invalid_address_registered_agent_address` on enums `V2.Core.Account.FutureRequirement.Entry.Error.code` and `V2.Core.Account.Requirement.Entry.Error.code` +* Add support for new values `blik_recurring_payments` and `satispay_payments` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability` +* Add support for `snapshot_event` on `V2.Core.Event` +* Add support for new values `blik_recurring_payments`, `satispay_payments`, and `sequra_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` +* Add support for snapshot events `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` with resource `apps.Install` +* Add support for event notifications `V1AccountApplicationAuthorizedEvent`, `V1AccountApplicationDeauthorizedEvent`, `V1AccountExternalAccountCreatedEvent`, `V1AccountExternalAccountDeletedEvent`, `V1AccountExternalAccountUpdatedEvent`, `V1BillingPortalSessionCreatedEvent`, and `V1EntitlementsActiveEntitlementSummaryUpdatedEvent` +* Add support for event notification `V1AccountUpdatedEvent` with related object `Account` +* Add support for event notifications `V1ApplicationFeeCreatedEvent` and `V1ApplicationFeeRefundedEvent` with related object `ApplicationFee` +* Add support for event notification `V1ApplicationFeeRefundUpdatedEvent` with related object `ApplicationFeeRefund` +* Add support for event notification `V1BalanceAvailableEvent` with related object `Balance` +* Add support for event notification `V1BalanceSettingsUpdatedEvent` with related object `BalanceSettings` +* Add support for event notification `V1BillingAlertTriggeredEvent` with related object `billing.Alert` +* Add support for event notification `V1BillingCreditBalanceTransactionCreatedEvent` with related object `billing.CreditBalanceTransaction` +* Add support for event notifications `V1BillingCreditGrantCreatedEvent` and `V1BillingCreditGrantUpdatedEvent` with related object `billing.CreditGrant` +* Add support for event notifications `V1BillingMeterCreatedEvent`, `V1BillingMeterDeactivatedEvent`, `V1BillingMeterReactivatedEvent`, and `V1BillingMeterUpdatedEvent` with related object `billing.Meter` +* Add support for event notifications `V1BillingPortalConfigurationCreatedEvent` and `V1BillingPortalConfigurationUpdatedEvent` with related object `billing_portal.Configuration` +* Add support for event notification `V1CapabilityUpdatedEvent` with related object `Capability` +* Add support for event notification `V1CashBalanceFundsAvailableEvent` with related object `CashBalance` +* Add support for event notifications `V1ChargeCapturedEvent`, `V1ChargeExpiredEvent`, `V1ChargeFailedEvent`, `V1ChargePendingEvent`, `V1ChargeRefundedEvent`, `V1ChargeSucceededEvent`, and `V1ChargeUpdatedEvent` with related object `Charge` +* Add support for event notifications `V1ChargeDisputeClosedEvent`, `V1ChargeDisputeCreatedEvent`, `V1ChargeDisputeFundsReinstatedEvent`, `V1ChargeDisputeFundsWithdrawnEvent`, and `V1ChargeDisputeUpdatedEvent` with related object `Dispute` +* Add support for event notifications `V1ChargeRefundUpdatedEvent`, `V1RefundCreatedEvent`, `V1RefundFailedEvent`, and `V1RefundUpdatedEvent` with related object `Refund` +* Add support for event notifications `V1CheckoutSessionAsyncPaymentFailedEvent`, `V1CheckoutSessionAsyncPaymentSucceededEvent`, `V1CheckoutSessionCompletedEvent`, and `V1CheckoutSessionExpiredEvent` with related object `checkout.Session` +* Add support for event notifications `V1ClimateOrderCanceledEvent`, `V1ClimateOrderCreatedEvent`, `V1ClimateOrderDelayedEvent`, `V1ClimateOrderDeliveredEvent`, and `V1ClimateOrderProductSubstitutedEvent` with related object `climate.Order` +* Add support for event notifications `V1ClimateProductCreatedEvent` and `V1ClimateProductPricingUpdatedEvent` with related object `climate.Product` +* Add support for event notifications `V1CouponCreatedEvent`, `V1CouponDeletedEvent`, and `V1CouponUpdatedEvent` with related object `Coupon` +* Add support for event notifications `V1CreditNoteCreatedEvent`, `V1CreditNoteUpdatedEvent`, and `V1CreditNoteVoidedEvent` with related object `CreditNote` +* Add support for event notifications `V1CustomerCreatedEvent`, `V1CustomerDeletedEvent`, and `V1CustomerUpdatedEvent` with related object `Customer` +* Add support for event notifications `V1CustomerDiscountCreatedEvent`, `V1CustomerDiscountDeletedEvent`, and `V1CustomerDiscountUpdatedEvent` with related object `Discount` +* Add support for event notifications `V1CustomerSubscriptionCreatedEvent`, `V1CustomerSubscriptionDeletedEvent`, `V1CustomerSubscriptionPausedEvent`, `V1CustomerSubscriptionPendingUpdateAppliedEvent`, `V1CustomerSubscriptionPendingUpdateExpiredEvent`, `V1CustomerSubscriptionResumedEvent`, `V1CustomerSubscriptionTrialWillEndEvent`, and `V1CustomerSubscriptionUpdatedEvent` with related object `Subscription` +* Add support for event notifications `V1CustomerTaxIdCreatedEvent`, `V1CustomerTaxIdDeletedEvent`, and `V1CustomerTaxIdUpdatedEvent` with related object `TaxId` +* Add support for event notification `V1CustomerCashBalanceTransactionCreatedEvent` with related object `CustomerCashBalanceTransaction` +* Add support for event notification `V1FileCreatedEvent` with related object `File` +* Add support for event notifications `V1FinancialConnectionsAccountAccountNumbersUpdatedEvent`, `V1FinancialConnectionsAccountCreatedEvent`, `V1FinancialConnectionsAccountDeactivatedEvent`, `V1FinancialConnectionsAccountDisconnectedEvent`, `V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent`, `V1FinancialConnectionsAccountReactivatedEvent`, `V1FinancialConnectionsAccountRefreshedBalanceEvent`, `V1FinancialConnectionsAccountRefreshedOwnershipEvent`, `V1FinancialConnectionsAccountRefreshedTransactionsEvent`, `V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent`, `V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent`, and `V1FinancialConnectionsAccountUpcomingDeactivationEvent` with related object `financial_connections.Account` +* Add support for event notifications `V1IdentityVerificationSessionCanceledEvent`, `V1IdentityVerificationSessionCreatedEvent`, `V1IdentityVerificationSessionProcessingEvent`, `V1IdentityVerificationSessionRedactedEvent`, `V1IdentityVerificationSessionRequiresInputEvent`, and `V1IdentityVerificationSessionVerifiedEvent` with related object `identity.VerificationSession` +* Add support for event notifications `V1InvoiceCreatedEvent`, `V1InvoiceDeletedEvent`, `V1InvoiceFinalizationFailedEvent`, `V1InvoiceFinalizedEvent`, `V1InvoiceMarkedUncollectibleEvent`, `V1InvoiceOverdueEvent`, `V1InvoiceOverpaidEvent`, `V1InvoicePaidEvent`, `V1InvoicePaymentActionRequiredEvent`, `V1InvoicePaymentAttemptRequiredEvent`, `V1InvoicePaymentFailedEvent`, `V1InvoicePaymentSucceededEvent`, `V1InvoiceSentEvent`, `V1InvoiceUpcomingEvent`, `V1InvoiceUpdatedEvent`, `V1InvoiceVoidedEvent`, and `V1InvoiceWillBeDueEvent` with related object `Invoice` +* Add support for event notification `V1InvoicePaymentPaidEvent` with related object `InvoicePayment` +* Add support for event notifications `V1InvoiceitemCreatedEvent` and `V1InvoiceitemDeletedEvent` with related object `InvoiceItem` +* Add support for event notifications `V1IssuingAuthorizationCreatedEvent`, `V1IssuingAuthorizationRequestEvent`, and `V1IssuingAuthorizationUpdatedEvent` with related object `issuing.Authorization` +* Add support for event notifications `V1IssuingCardCreatedEvent` and `V1IssuingCardUpdatedEvent` with related object `issuing.Card` +* Add support for event notifications `V1IssuingCardholderCreatedEvent` and `V1IssuingCardholderUpdatedEvent` with related object `issuing.Cardholder` +* Add support for event notifications `V1IssuingDisputeClosedEvent`, `V1IssuingDisputeCreatedEvent`, `V1IssuingDisputeFundsReinstatedEvent`, `V1IssuingDisputeFundsRescindedEvent`, `V1IssuingDisputeSubmittedEvent`, and `V1IssuingDisputeUpdatedEvent` with related object `issuing.Dispute` +* Add support for event notifications `V1IssuingPersonalizationDesignActivatedEvent`, `V1IssuingPersonalizationDesignDeactivatedEvent`, `V1IssuingPersonalizationDesignRejectedEvent`, and `V1IssuingPersonalizationDesignUpdatedEvent` with related object `issuing.PersonalizationDesign` +* Add support for event notifications `V1IssuingTokenCreatedEvent` and `V1IssuingTokenUpdatedEvent` with related object `issuing.Token` +* Add support for event notifications `V1IssuingTransactionCreatedEvent`, `V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent`, and `V1IssuingTransactionUpdatedEvent` with related object `issuing.Transaction` +* Add support for event notification `V1MandateUpdatedEvent` with related object `Mandate` +* Add support for event notifications `V1PaymentIntentAmountCapturableUpdatedEvent`, `V1PaymentIntentCanceledEvent`, `V1PaymentIntentCreatedEvent`, `V1PaymentIntentPartiallyFundedEvent`, `V1PaymentIntentPaymentFailedEvent`, `V1PaymentIntentProcessingEvent`, `V1PaymentIntentRequiresActionEvent`, and `V1PaymentIntentSucceededEvent` with related object `PaymentIntent` +* Add support for event notifications `V1PaymentLinkCreatedEvent` and `V1PaymentLinkUpdatedEvent` with related object `PaymentLink` +* Add support for event notifications `V1PaymentMethodAttachedEvent`, `V1PaymentMethodAutomaticallyUpdatedEvent`, `V1PaymentMethodDetachedEvent`, and `V1PaymentMethodUpdatedEvent` with related object `PaymentMethod` +* Add support for event notifications `V1PayoutCanceledEvent`, `V1PayoutCreatedEvent`, `V1PayoutFailedEvent`, `V1PayoutPaidEvent`, `V1PayoutReconciliationCompletedEvent`, and `V1PayoutUpdatedEvent` with related object `Payout` +* Add support for event notifications `V1PersonCreatedEvent`, `V1PersonDeletedEvent`, and `V1PersonUpdatedEvent` with related object `Person` +* Add support for event notifications `V1PlanCreatedEvent`, `V1PlanDeletedEvent`, and `V1PlanUpdatedEvent` with related object `Plan` +* Add support for event notifications `V1PriceCreatedEvent`, `V1PriceDeletedEvent`, and `V1PriceUpdatedEvent` with related object `Price` +* Add support for event notifications `V1ProductCreatedEvent`, `V1ProductDeletedEvent`, and `V1ProductUpdatedEvent` with related object `Product` +* Add support for event notifications `V1PromotionCodeCreatedEvent` and `V1PromotionCodeUpdatedEvent` with related object `PromotionCode` +* Add support for event notifications `V1QuoteAcceptedEvent`, `V1QuoteCanceledEvent`, `V1QuoteCreatedEvent`, and `V1QuoteFinalizedEvent` with related object `Quote` +* Add support for event notifications `V1RadarEarlyFraudWarningCreatedEvent` and `V1RadarEarlyFraudWarningUpdatedEvent` with related object `radar.EarlyFraudWarning` +* Add support for event notifications `V1ReviewClosedEvent` and `V1ReviewOpenedEvent` with related object `Review` +* Add support for event notifications `V1SetupIntentCanceledEvent`, `V1SetupIntentCreatedEvent`, `V1SetupIntentRequiresActionEvent`, `V1SetupIntentSetupFailedEvent`, and `V1SetupIntentSucceededEvent` with related object `SetupIntent` +* Add support for event notification `V1SigmaScheduledQueryRunCreatedEvent` with related object `sigma.ScheduledQueryRun` +* Add support for event notifications `V1SourceCanceledEvent`, `V1SourceChargeableEvent`, `V1SourceFailedEvent`, and `V1SourceRefundAttributesRequiredEvent` with related object `Source` +* Add support for event notifications `V1SubscriptionScheduleAbortedEvent`, `V1SubscriptionScheduleCanceledEvent`, `V1SubscriptionScheduleCompletedEvent`, `V1SubscriptionScheduleCreatedEvent`, `V1SubscriptionScheduleExpiringEvent`, `V1SubscriptionScheduleReleasedEvent`, and `V1SubscriptionScheduleUpdatedEvent` with related object `SubscriptionSchedule` +* Add support for event notification `V1TaxSettingsUpdatedEvent` with related object `tax.Settings` +* Add support for event notifications `V1TaxRateCreatedEvent` and `V1TaxRateUpdatedEvent` with related object `TaxRate` +* Add support for event notifications `V1TerminalReaderActionFailedEvent`, `V1TerminalReaderActionSucceededEvent`, and `V1TerminalReaderActionUpdatedEvent` with related object `terminal.Reader` +* Add support for event notifications `V1TestHelpersTestClockAdvancingEvent`, `V1TestHelpersTestClockCreatedEvent`, `V1TestHelpersTestClockDeletedEvent`, `V1TestHelpersTestClockInternalFailureEvent`, and `V1TestHelpersTestClockReadyEvent` with related object `test_helpers.TestClock` +* Add support for event notifications `V1TopupCanceledEvent`, `V1TopupCreatedEvent`, `V1TopupFailedEvent`, `V1TopupReversedEvent`, and `V1TopupSucceededEvent` with related object `Topup` +* Add support for event notifications `V1TransferCreatedEvent`, `V1TransferReversedEvent`, and `V1TransferUpdatedEvent` with related object `Transfer` +* Add support for error codes `dispute_evidence_page_limit_exceeded`, `financial_connections_consent_locale_invalid`, `financial_connections_consent_locale_unsupported`, and `payment_evaluation_on_api_version_not_supported` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, `StripeError`, and `Terminal.Reader.Action.ApiError` diff --git a/.hark/changes/2026-10-15_stripe-openapi_cc0e378c.change.md b/.hark/changes/2026-10-15_stripe-openapi_cc0e378c.change.md new file mode 100644 index 000000000..9fbf971d5 --- /dev/null +++ b/.hark/changes/2026-10-15_stripe-openapi_cc0e378c.change.md @@ -0,0 +1,8 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1938 +semver_level: minor +is_stripe_api_change: true +--- + +* Release specs are identical. diff --git a/.hark/migration-guides/v16.md b/.hark/migration-guides/v16.md new file mode 100644 index 000000000..852bab155 --- /dev/null +++ b/.hark/migration-guides/v16.md @@ -0,0 +1,80 @@ +# Migration guide for v16 + +This version of the SDK uses API version `2026-09-30.endive`. If the format of this API version looks new to you, see our new [API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). + +Please review our API changelog for [`2026-09-30.endive`](https://docs.stripe.com/changelog/2026-09-30.endive) to understand all the breaking changes to the Stripe API, the reasons behind them and potential alternatives. + +The Python SDK specific [changelog for v16](https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#16-0-0) has the corresponding changes in the SDKs as well as SDK specific breaking changes. + + + +## Rename `stripe.Reversal` to `stripe.TransferReversal` + +The class representing a transfer reversal has been renamed from `stripe.Reversal` to `stripe.TransferReversal`. + +This change affects integrations that reference `stripe.Reversal` directly, including imports, class comparisons, `isinstance` checks, and type annotations. Replace those references with `stripe.TransferReversal`: + +```python +# Before +reversal = stripe.Transfer.retrieve_reversal("tr_123", "trr_123") +isinstance(reversal, stripe.Reversal) + +# After +reversal = stripe.Transfer.retrieve_reversal("tr_123", "trr_123") +isinstance(reversal, stripe.TransferReversal) +``` + +The methods for creating, retrieving, modifying, and listing transfer reversals have not changed. Code that only calls those methods and reads attributes from the returned object does not require an update. + +## `StripeObject.request()` has been removed + +The deprecated `StripeObject.request()` method has been removed. If you used it to make custom API requests, create a `StripeClient` and use `raw_request()` instead: + +```python +# Before +response = stripe_object.request("get", "/v1/example") + +# After +client = stripe.StripeClient("sk_test_...") +response = client.raw_request("get", "/v1/example") +``` + +## Path parameters must now be passed positionally + +Path parameters must now be passed positionally instead of by keyword. + +For example, a customer ID that was previously accepted as a keyword argument: + +```python +customer = client.v1.customers.retrieve(customer="cus_123") +``` + +must now be passed positionally: + +```python +customer = client.v1.customers.retrieve("cus_123") +``` + +This also affects legacy resource methods that support both classmethod and instance-method call styles. For example, `Customer.retrieve_payment_method`: + +```python +# Before +payment_method = customer.retrieve_payment_method( + payment_method="pm_123" +) +payment_method = stripe.Customer.retrieve_payment_method( + customer="cus_123", payment_method="pm_123" +) + +# After +payment_method = customer.retrieve_payment_method("pm_123") +payment_method = stripe.Customer.retrieve_payment_method( + "cus_123", "pm_123" +) +``` + +Update calls to your methods to pass path parameters before any request parameters or options. diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6aca587b4..fa4d14228 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -588801ef34f7b5f7d6a784d3354f5f93d2a26ffb \ No newline at end of file +957e285f264aa90413dd32234c64e0e81a845ef5 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bfaa37da3..154ee1476 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2526 \ No newline at end of file +v2576 \ No newline at end of file diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 740089866..8f21f225a 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -420,6 +420,10 @@ } V2_OBJECT_CLASSES: Dict[str, Tuple[str, str]] = { + "v2.search_result": ( + "stripe.v2._search_result_object", + "SearchResultObject", + ), # V2 Object classes: The beginning of the section generated from our OpenAPI spec "v2.billing.bill_setting": ( "stripe.v2.billing._bill_setting", diff --git a/stripe/_stripe_service.py b/stripe/_stripe_service.py index 174858968..1088f64b6 100644 --- a/stripe/_stripe_service.py +++ b/stripe/_stripe_service.py @@ -9,11 +9,25 @@ from stripe._request_options import RequestOptions from stripe._base_address import BaseAddress -from typing import Any, Dict, Mapping, Optional +from typing import Any, Dict, Mapping, Optional, Tuple +from urllib.parse import quote from stripe._encode import _coerce_v2_params, _SchemaNode +def _split_v2_search_params( + url: str, params: Optional[Mapping[str, Any]] +) -> Tuple[str, Optional[Mapping[str, Any]]]: + if params is None or "limit" not in params: + return url, params + body_params = dict(params) + limit = body_params.pop("limit") + if "limit=" not in url: + separator = "&" if "?" in url else "?" + url = "%s%slimit=%s" % (url, separator, quote(str(limit), safe="")) + return url, body_params + + class StripeService(object): _requestor: _APIRequestor @@ -32,6 +46,12 @@ def _request( ) -> StripeObject: if _param_encodings: params = _coerce_v2_params(params, _param_encodings) + if ( + method == "post" + and url.split("?", 1)[0].startswith("/v2/") + and url.split("?", 1)[0].endswith("/search") + ): + url, params = _split_v2_search_params(url, params) return self._requestor.request( method, url, @@ -53,6 +73,12 @@ async def _request_async( ) -> StripeObject: if _param_encodings: params = _coerce_v2_params(params, _param_encodings) + if ( + method == "post" + and url.split("?", 1)[0].startswith("/v2/") + and url.split("?", 1)[0].endswith("/search") + ): + url, params = _split_v2_search_params(url, params) return await self._requestor.request_async( method, url, diff --git a/stripe/_util.py b/stripe/_util.py index 8b378c63c..e034b209f 100644 --- a/stripe/_util.py +++ b/stripe/_util.py @@ -288,6 +288,7 @@ def _convert_to_stripe_object( and ( (getattr(obj, "object") == "list") or (getattr(obj, "object") == "search_result") + or (getattr(obj, "object") == "v2.search_result") ) ): obj._retrieve_params = params diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 259781122..beb81d6c1 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -1,5 +1,8 @@ from typing_extensions import TYPE_CHECKING from stripe.v2._list_object import ListObject as ListObject +from stripe.v2._search_result_object import ( + SearchResultObject as SearchResultObject, +) from stripe.v2._amount import Amount as Amount, AmountParam as AmountParam diff --git a/stripe/v2/_search_result_object.py b/stripe/v2/_search_result_object.py new file mode 100644 index 000000000..972aa382a --- /dev/null +++ b/stripe/v2/_search_result_object.py @@ -0,0 +1,80 @@ +from copy import deepcopy +from typing import ( + AsyncIterator, + Generic, + Iterator, + List, + Mapping, + Any, + Optional, + TypeVar, +) + +from stripe._any_iterator import AnyIterator +from stripe._stripe_object import StripeObject + + +T = TypeVar("T", bound=StripeObject) + + +class SearchResultObject(StripeObject, Generic[T]): + """A page of API v2 search results with POST-based auto-pagination.""" + + OBJECT_NAME = "v2.search_result" + data: List[T] + next_page_url: Optional[str] + previous_page_url: Optional[str] + total_count: int + + def __iter__(self) -> Iterator[T]: + return getattr(self, "data", []).__iter__() + + def __len__(self) -> int: + return getattr(self, "data", []).__len__() + + def auto_paging_iter(self) -> AnyIterator[T]: + return AnyIterator( + self._auto_paging_iter(), self._auto_paging_iter_async() + ) + + def _original_params(self) -> Mapping[str, Any]: + return deepcopy(self._retrieve_params) + + def _body_params(self, params: Mapping[str, Any]) -> Mapping[str, Any]: + body_params = dict(params) + body_params.pop("limit", None) + return body_params + + def _auto_paging_iter(self) -> Iterator[T]: + page: SearchResultObject[T] = self + params = self._original_params() + while True: + for item in page.data: + yield item + if page.next_page_url is None: + break + result = self._request( + "post", + page.next_page_url, + params=self._body_params(params), + base_address="api", + ) + assert isinstance(result, SearchResultObject) + page = result + + async def _auto_paging_iter_async(self) -> AsyncIterator[T]: + page: SearchResultObject[T] = self + params = self._original_params() + while True: + for item in page.data: + yield item + if page.next_page_url is None: + break + result = await self._request_async( + "post", + page.next_page_url, + params=self._body_params(params), + base_address="api", + ) + assert isinstance(result, SearchResultObject) + page = result diff --git a/tests/test_v2_search_result_object.py b/tests/test_v2_search_result_object.py new file mode 100644 index 000000000..002b606d8 --- /dev/null +++ b/tests/test_v2_search_result_object.py @@ -0,0 +1,88 @@ +import pytest + +from stripe.v2._search_result_object import SearchResultObject + + +class TestSearchResult(SearchResultObject): + requests = [] + pages = [] + + def _request(self, method, url, params=None, **kwargs): + self.requests.append((method, url, params, kwargs)) + return self.pages.pop(0) + + async def _request_async(self, method, url, params=None, **kwargs): + return self._request(method, url, params=params, **kwargs) + + +def make_result(data, next_page_url): + result = TestSearchResult._construct_from( + values={ + "object": "v2.search_result", + "data": data, + "next_page_url": next_page_url, + "previous_page_url": None, + "total_count": 2, + }, + last_response=None, + requestor=None, + api_mode="V2", + ) + return result + + +def test_auto_paging_replays_original_post_body(): + params = { + "query": 'status:"active"', + "sort": ["name", "-created"], + "limit": 2, + "future_field": {"enabled": True}, + } + first = make_result(["one"], "/v2/widgets/search?page=2&limit=2") + first._retrieve_params = params + TestSearchResult.requests = [] + TestSearchResult.pages = [ + make_result([], "/v2/widgets/search?page=3&limit=2"), + make_result(["two"], None), + ] + + assert list(first.auto_paging_iter()) == ["one", "two"] + assert [ + (method, url, body) + for method, url, body, _ in TestSearchResult.requests + ] == [ + ( + "post", + "/v2/widgets/search?page=2&limit=2", + { + "query": 'status:"active"', + "sort": ["name", "-created"], + "future_field": {"enabled": True}, + }, + ), + ( + "post", + "/v2/widgets/search?page=3&limit=2", + { + "query": 'status:"active"', + "sort": ["name", "-created"], + "future_field": {"enabled": True}, + }, + ), + ] + + +@pytest.mark.anyio +async def test_async_auto_paging_replays_original_post_body(): + first = make_result(["one"], "/v2/widgets/search?page=2") + first._retrieve_params = {"query": "widgets"} + TestSearchResult.requests = [] + TestSearchResult.pages = [make_result(["two"], None)] + + results = [item async for item in first.auto_paging_iter()] + assert results == ["one", "two"] + assert TestSearchResult.requests[0][:3] == ( + "post", + "/v2/widgets/search?page=2", + {"query": "widgets"}, + )