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-02_stripe-openapi_276b51ed.change.md b/.hark/changes/2026-10-02_stripe-openapi_276b51ed.change.md new file mode 100644 index 000000000..717d4b9a5 --- /dev/null +++ b/.hark/changes/2026-10-02_stripe-openapi_276b51ed.change.md @@ -0,0 +1,31 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1937 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `radar.Rule` and `v2.money_management.FundingSession` +* Add support for `create` method on resource `v2.money_management.FundingSession` +* ⚠️ Change type of `Charge.Outcome.rule` from `RadarRule` to `$Radar.Rule` +* Add support for new value `ousd` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency` +* Add support for `payment_settings` on `Checkout.Session` and `checkout.SessionCreateParams` +* Add support for `on_behalf_of` on `Checkout.Session` +* Add support for new values `fednow` and `rtp` on enum `CustomerCashBalanceTransaction.Funded.BankTransfer.UsBankTransfer.network` +* Add support for `fuels` on `Issuing.Transaction.PurchaseDetail` +* Add support for `fleet` on `PaymentIntent.PaymentMethodOption.CardPresent`, `PaymentIntentConfirmParamsPaymentMethodOptionCardPresent`, `PaymentIntentCreateParamsPaymentMethodOptionCardPresent`, and `PaymentIntentModifyParamsPaymentMethodOptionCardPresent` +* Add support for `subscription_reference` on `PaymentIntent.PaymentMethodOption.Paypay`, `PaymentIntentConfirmParamsPaymentMethodOptionPaypay`, `PaymentIntentCreateParamsPaymentMethodOptionPaypay`, and `PaymentIntentModifyParamsPaymentMethodOptionPaypay` +* Add support for `us_bank_account` on `Radar.PaymentEvaluation.PaymentDetail.MoneyMovementDetail` and `radar.PaymentEvaluationCreateParamsPaymentDetailMoneyMovementDetail` +* Change type of `radar.PaymentEvaluationCreateParamsPaymentDetailMoneyMovementDetail.money_movement_type` from `literal('card')` to `enum('card'|'us_bank_account')` +* Add support for `rules` on `Radar.PaymentEvaluation` +* ⚠️ Change type of `Radar.PaymentEvaluation.PaymentDetail.MoneyMovementDetail.money_movement_type` from `literal('card')` to `enum('card'|'us_bank_account')` +* Add support for new values `request_three_d_secure` and `reroute` on enum `Radar.PaymentEvaluation.recommended_action` +* Add support for `bank_initiated_return` on `Radar.PaymentEvaluation.Signal` +* Add support for `account` on `V2.MoneyManagement.FinancialAddress`, `v2.money_management.FinancialAddressCreateParams`, and `v2.money_management.FinancialAddressListParams` +* Add support for new values `bre_b` and `pix` on enum `V2.MoneyManagement.FinancialAddress.BankAccount.type` +* Add support for `supported_network_details` on `V2.MoneyManagement.FinancialAddress.CryptoWallet` +* Add support for new value `bitcoin` on enums `V2.MoneyManagement.FinancialAddress.CryptoWallet.network`, `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer.CryptoWallet.network`, and `v2.money_management.FinancialAddressCreateParamsCryptoWallet.network` +* Add support for `network_details` on `V2.MoneyManagement.InboundTransfer` and `v2.money_management.InboundTransferCreateParams` +* Add support for `originating_crypto_wallet`, `token_currency`, and `transaction_hash` on `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer` +* Add support for new values `brl` and `cop` on enum `v2.money_management.FinancialAddressCreateParamsBankAccount.currency` +* Add support for `customer` and `subscription` on `EventsV1InvoiceUpcomingEvent` 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..31f4185e5 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -588801ef34f7b5f7d6a784d3354f5f93d2a26ffb \ No newline at end of file +0ee5149c04f53d8abd0c4143b83d4156a15f5ad0 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bfaa37da3..a9c94b87d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2526 \ No newline at end of file +v2532 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index d4c5d3623..e4fca00d9 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -50,6 +50,7 @@ ChargeRetrieveRefundParams, ) from stripe.params._charge_search_params import ChargeSearchParams + from stripe.radar._rule import Rule @nested_resource_class_methods("refund") @@ -144,20 +145,6 @@ class LineItem(StripeObject): _inner_class_types = {"line_items": LineItem} class Outcome(StripeObject): - class Rule(StripeObject): - action: str - """ - The action taken on the payment. - """ - id: str - """ - Unique identifier for the object. - """ - predicate: str - """ - The predicate to evaluate the payment against. - """ - advice_code: Optional[ Union[ Literal[ @@ -193,7 +180,7 @@ class Rule(StripeObject): """ Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. """ - rule: Optional[ExpandableField[Rule]] + rule: Optional[ExpandableField["Rule"]] """ The ID of the Radar rule that matched the payment, if applicable. """ @@ -205,7 +192,6 @@ class Rule(StripeObject): """ Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://docs.stripe.com/declines) and [Radar reviews](https://docs.stripe.com/radar/reviews) for details. """ - _inner_class_types = {"rule": Rule} class PaymentMethodDetails(StripeObject): class AchCreditTransfer(StripeObject): @@ -1308,6 +1294,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/_customer_cash_balance_transaction.py b/stripe/_customer_cash_balance_transaction.py index 801318527..1e1afc067 100644 --- a/stripe/_customer_cash_balance_transaction.py +++ b/stripe/_customer_cash_balance_transaction.py @@ -100,7 +100,12 @@ class JpBankTransfer(StripeObject): class UsBankTransfer(StripeObject): network: Optional[ - Union[Literal["ach", "domestic_wire_us", "swift"], str] + Union[ + Literal[ + "ach", "domestic_wire_us", "fednow", "rtp", "swift" + ], + str, + ] ] """ The banking network used for this funding. diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 67ebf0b40..6fb7bdbfe 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -364,6 +364,7 @@ "stripe.radar._payment_evaluation", "PaymentEvaluation", ), + "radar.rule": ("stripe.radar._rule", "Rule"), "radar.value_list": ("stripe.radar._value_list", "ValueList"), "radar.value_list_item": ( "stripe.radar._value_list_item", @@ -735,6 +736,10 @@ "stripe.v2.money_management._financial_address_generated_microdeposits", "FinancialAddressGeneratedMicrodeposits", ), + "v2.money_management.funding_session": ( + "stripe.v2.money_management._funding_session", + "FundingSession", + ), "v2.money_management.inbound_transfer": ( "stripe.v2.money_management._inbound_transfer", "InboundTransfer", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 3713ab4d7..1cdf49fae 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -1028,6 +1028,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 4a3aa343d..3ac6fa7cb 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -4072,6 +4072,46 @@ class CaptureDelay(StripeObject): You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. """ + class Fleet(StripeObject): + class TransactionDatum(StripeObject): + prompt: Literal[ + "additional_fleet_data_1", + "additional_fleet_data_2", + "driver_id", + "employee_number", + "entered_data_alphanumeric", + "entered_data_numeric", + "generic_id", + "invoice_number", + "odometer", + "postal_code", + "reefer_hours", + "replacement_car", + "trailer_number", + "trip_number", + "unit_number", + "vehicle_id", + "vehicle_tag", + "work_order", + ] + """ + The prompt that the Terminal SDK displays to collect this Fleet value. + """ + receipt_behavior: Literal["omit", "print"] + """ + Whether the collected value is printed on the receipt. + """ + value: str + """ + The value collected for this Fleet prompt. + """ + + transaction_data: List[TransactionDatum] + """ + Fleet prompts and values collected for this transaction. + """ + _inner_class_types = {"transaction_data": TransactionDatum} + class Routing(StripeObject): requested_priority: Optional[ Union[Literal["domestic", "international"], str] @@ -4098,6 +4138,10 @@ class Routing(StripeObject): """ Controls when the funds will be captured from the customer's account. """ + fleet: Optional[Fleet] + """ + Fleet prompting data for this payment. + """ request_extended_authorization: Optional[bool] """ Request ability to capture this payment beyond the standard [authorization validity window](https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity) @@ -4122,6 +4166,7 @@ class Routing(StripeObject): _inner_class_types = { "aade_data": AadeData, "capture_delay": CaptureDelay, + "fleet": Fleet, "routing": Routing, } @@ -4743,6 +4788,10 @@ class Paypay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscription_reference: Optional[str] + """ + A reference to the merchant subscription this payment corresponds to. + """ class Payto(StripeObject): class MandateOptions(StripeObject): diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 940516d18..f1bd14acf 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -1043,6 +1043,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 8e07133c6..82f1abbde 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -50,7 +50,7 @@ class CurrentRepaymentInterval(StripeObject): """ advance_paid_out_at: Optional[float] """ - The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. + The time at which the funds were paid out to the connected account's Stripe balance. Given in seconds since unix epoch. """ currency: str """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 53f0b2083..a8c4b88dd 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2585,6 +2585,79 @@ class WechatPay(StripeObject): "wechat_pay": WechatPay, } + class PaymentSettings(StripeObject): + class ApplicationFeeData(StripeObject): + initial_amount: Optional[int] + """ + The application fee amount, in the currency's smallest unit, applied to the initial payment. + """ + percentage_decimal: Optional[Decimal] + """ + The percentage of each payment collected as an application fee. + """ + _field_encodings = {"percentage_decimal": "decimal_string"} + + class TransferData(StripeObject): + class TransferAmount(StripeObject): + initial_amount: Optional[int] + """ + The amount, in the currency's smallest unit, transferred from the initial payment. + """ + percentage_decimal: Optional[Decimal] + """ + The percentage of each payment transferred to the destination account. + """ + _field_encodings = {"percentage_decimal": "decimal_string"} + + destination: str + """ + The connected account that receives funds from payments created by this Checkout Session. + """ + transfer_amount: Optional[TransferAmount] + """ + Configures the amount transferred to the destination account. + """ + _inner_class_types = {"transfer_amount": TransferAmount} + + application_fee_data: Optional[ApplicationFeeData] + """ + Configures an application fee transferred to the application owner's Stripe account. + """ + capture_method: Optional[str] + """ + Controls when the funds will be captured from the customer's account. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + setup_future_usage: Optional[ + Union[Literal["off_session", "on_session"], str] + ] + """ + Indicates that you intend to make future payments with the payment method collected by this Checkout Session. + """ + statement_descriptor: Optional[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. + """ + transfer_data: Optional[TransferData] + """ + Configures automatic transfers to a connected account when payments succeed. + """ + transfer_group: Optional[str] + """ + A string that identifies the initial payment as part of a group. + """ + _inner_class_types = { + "application_fee_data": ApplicationFeeData, + "transfer_data": TransferData, + } + class Permissions(StripeObject): class Update(StripeObject): line_items: Optional[ @@ -3359,6 +3432,10 @@ class Link(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + on_behalf_of: Optional[str] + """ + The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + """ optional_items: Optional[List[OptionalItem]] """ The optional items presented to the customer at checkout. @@ -3404,6 +3481,7 @@ class Link(StripeObject): """ The ID of the Payment Reservation for this Checkout Session. """ + payment_settings: Optional[PaymentSettings] payment_status: Union[ Literal["no_payment_required", "paid", "unpaid"], str ] @@ -3991,6 +4069,7 @@ async def retrieve_async( "optional_items": OptionalItem, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, + "payment_settings": PaymentSettings, "permissions": Permissions, "phone_number_collection": PhoneNumberCollection, "presentment_details": PresentmentDetails, diff --git a/stripe/events/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py index 91505066c..6ac670a56 100644 --- a/stripe/events/_v1_invoice_upcoming_event.py +++ b/stripe/events/_v1_invoice_upcoming_event.py @@ -1,8 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import cast -from typing_extensions import Literal, override +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor class V1InvoiceUpcomingEventNotification(EventNotification): @@ -27,3 +33,42 @@ async def fetch_event_async(self) -> "V1InvoiceUpcomingEvent": class V1InvoiceUpcomingEvent(Event): LOOKUP_TYPE = "v1.invoice.upcoming" type: Literal["v1.invoice.upcoming"] + + class V1InvoiceUpcomingEventData(StripeObject): + customer: str + """ + The ID of the customer this upcoming invoice is associated with. + """ + subscription: Optional[str] + """ + The ID of the subscription, if any. + """ + + data: V1InvoiceUpcomingEventData + """ + Data for the v1.invoice.upcoming event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1InvoiceUpcomingEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1InvoiceUpcomingEvent.V1InvoiceUpcomingEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index b39f16e51..337a238a7 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -492,6 +492,32 @@ class Fuel(StripeObject): "unit_cost_decimal": "decimal_string", } + class Fuels(StripeObject): + industry_product_code: Optional[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: Optional[Decimal] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: str + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: str + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: Decimal + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + _field_encodings = { + "quantity_decimal": "decimal_string", + "unit_cost_decimal": "decimal_string", + } + class Lodging(StripeObject): check_in_at: Optional[int] """ @@ -532,6 +558,10 @@ class Receipt(StripeObject): """ Information about fuel that was purchased with this transaction. """ + fuels: Optional[List[Fuels]] + """ + Information about the list of fuel items that were purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + """ lodging: Optional[Lodging] """ Information about lodging that was purchased with this transaction. @@ -548,6 +578,7 @@ class Receipt(StripeObject): "fleet": Fleet, "flight": Flight, "fuel": Fuel, + "fuels": Fuels, "lodging": Lodging, "receipt": Receipt, } diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index a8c49cb6a..f91866c36 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -2672,6 +2672,8 @@ PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay, + PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleet as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleet, + PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleetTransactionDatum as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleetTransactionDatum, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, @@ -3006,6 +3008,8 @@ PaymentIntentCreateParamsPaymentMethodOptionsCardPresent as PaymentIntentCreateParamsPaymentMethodOptionsCardPresent, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay, + PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleet as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleet, + PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, @@ -3394,6 +3398,8 @@ PaymentIntentModifyParamsPaymentMethodOptionsCardPresent as PaymentIntentModifyParamsPaymentMethodOptionsCardPresent, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay, + PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleet as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleet, + PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleetTransactionDatum as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleetTransactionDatum, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, @@ -3746,6 +3752,8 @@ PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay, + PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleet as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleet, + PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFunding, @@ -14908,6 +14916,14 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleet": ( + "stripe.params._payment_intent_confirm_params", + False, + ), + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleetTransactionDatum": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_confirm_params", False, @@ -16236,6 +16252,14 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleet": ( + "stripe.params._payment_intent_create_params", + False, + ), + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_create_params", False, @@ -17748,6 +17772,14 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleet": ( + "stripe.params._payment_intent_modify_params", + False, + ), + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleetTransactionDatum": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_modify_params", False, @@ -19100,6 +19132,14 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleet": ( + "stripe.params._payment_intent_update_params", + False, + ), + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails": ( "stripe.params._payment_intent_update_params", False, diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py index b93d10c91..ba805ecd7 100644 --- a/stripe/params/_charge_capture_params.py +++ b/stripe/params/_charge_capture_params.py @@ -28,7 +28,7 @@ class ChargeCaptureParams(RequestOptions): """ receipt_email: NotRequired[str] """ - The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts are only sent for payments in live mode. """ statement_descriptor: NotRequired[str] """ diff --git a/stripe/params/_charge_create_params.py b/stripe/params/_charge_create_params.py index cfa3e339b..913ad68a5 100644 --- a/stripe/params/_charge_create_params.py +++ b/stripe/params/_charge_create_params.py @@ -53,7 +53,7 @@ class ChargeCreateParams(RequestOptions): """ receipt_email: NotRequired[str] """ - The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://docs.stripe.com/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and receipts are only sent for payments in live mode. If this charge is for a [Customer](https://docs.stripe.com/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ shipping: NotRequired["ChargeCreateParamsShipping"] """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 91b1a23f9..4a09b587d 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -189,7 +189,7 @@ class PaymentIntentConfirmParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + The ID of a PaymentMethod to attach to this PaymentIntent. If the payment method is attached to a Customer, it must match the [customer](https://docs.stripe.com/api#create_payment_intent-customer) that is set on this PaymentIntent. """ payment_method_data: NotRequired[ @@ -5100,6 +5100,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + fleet: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleet" + ] + """ + Fleet prompting data for this payment. + """ payment_details: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails" ] @@ -5166,6 +5172,53 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay( hours: NotRequired[int] +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleet( + TypedDict +): + transaction_data: NotRequired[ + "Literal['']|List[PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleetTransactionDatum]" + ] + """ + Fleet prompts and values collected for this transaction. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentFleetTransactionDatum( + TypedDict, +): + prompt: Literal[ + "additional_fleet_data_1", + "additional_fleet_data_2", + "driver_id", + "employee_number", + "entered_data_alphanumeric", + "entered_data_numeric", + "generic_id", + "invoice_number", + "odometer", + "postal_code", + "reefer_hours", + "replacement_car", + "trailer_number", + "trip_number", + "unit_number", + "vehicle_id", + "vehicle_tag", + "work_order", + ] + """ + The prompt that the Terminal SDK displays to collect this Fleet value. + """ + receipt_behavior: NotRequired[Literal["omit", "print"]] + """ + Whether the collected value is printed on the receipt. Defaults to `omit`. + """ + value: Union[Literal[""], str] + """ + The value collected for this Fleet prompt. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -7067,6 +7120,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscription_reference: NotRequired[str] + """ + The merchant's subscription identifier for this off-session charge. + """ class PaymentIntentConfirmParamsPaymentMethodOptionsPayto(TypedDict): diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 6d2427fd1..88493eced 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -304,7 +304,7 @@ class PaymentIntentCreateParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + The ID of a PaymentMethod to attach to this PaymentIntent. If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://docs.stripe.com/api#create_payment_intent-customer) parameter of this PaymentIntent. @@ -5228,6 +5228,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + fleet: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleet" + ] + """ + Fleet prompting data for this payment. + """ payment_details: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails" ] @@ -5294,6 +5300,51 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay( hours: NotRequired[int] +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleet(TypedDict): + transaction_data: NotRequired[ + "Literal['']|List[PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum]" + ] + """ + Fleet prompts and values collected for this transaction. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum( + TypedDict, +): + prompt: Literal[ + "additional_fleet_data_1", + "additional_fleet_data_2", + "driver_id", + "employee_number", + "entered_data_alphanumeric", + "entered_data_numeric", + "generic_id", + "invoice_number", + "odometer", + "postal_code", + "reefer_hours", + "replacement_car", + "trailer_number", + "trip_number", + "unit_number", + "vehicle_id", + "vehicle_tag", + "work_order", + ] + """ + The prompt that the Terminal SDK displays to collect this Fleet value. + """ + receipt_behavior: NotRequired[Literal["omit", "print"]] + """ + Whether the collected value is printed on the receipt. Defaults to `omit`. + """ + value: Union[Literal[""], str] + """ + The value collected for this Fleet prompt. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -7195,6 +7246,10 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscription_reference: NotRequired[str] + """ + The merchant's subscription identifier for this off-session charge. + """ class PaymentIntentCreateParamsPaymentMethodOptionsPayto(TypedDict): diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index daea126d5..42edb0c72 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -5071,6 +5071,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + fleet: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleet" + ] + """ + Fleet prompting data for this payment. + """ payment_details: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails" ] @@ -5137,6 +5143,51 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay( hours: NotRequired[int] +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleet(TypedDict): + transaction_data: NotRequired[ + "Literal['']|List[PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleetTransactionDatum]" + ] + """ + Fleet prompts and values collected for this transaction. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentFleetTransactionDatum( + TypedDict, +): + prompt: Literal[ + "additional_fleet_data_1", + "additional_fleet_data_2", + "driver_id", + "employee_number", + "entered_data_alphanumeric", + "entered_data_numeric", + "generic_id", + "invoice_number", + "odometer", + "postal_code", + "reefer_hours", + "replacement_car", + "trailer_number", + "trip_number", + "unit_number", + "vehicle_id", + "vehicle_tag", + "work_order", + ] + """ + The prompt that the Terminal SDK displays to collect this Fleet value. + """ + receipt_behavior: NotRequired[Literal["omit", "print"]] + """ + Whether the collected value is printed on the receipt. Defaults to `omit`. + """ + value: Union[Literal[""], str] + """ + The value collected for this Fleet prompt. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -7038,6 +7089,10 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscription_reference: NotRequired[str] + """ + The merchant's subscription identifier for this off-session charge. + """ class PaymentIntentModifyParamsPaymentMethodOptionsPayto(TypedDict): diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 5d2d9f81b..a21f34b41 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -5070,6 +5070,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + fleet: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleet" + ] + """ + Fleet prompting data for this payment. + """ payment_details: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails" ] @@ -5136,6 +5142,51 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay( hours: NotRequired[int] +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleet(TypedDict): + transaction_data: NotRequired[ + "Literal['']|List[PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum]" + ] + """ + Fleet prompts and values collected for this transaction. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentFleetTransactionDatum( + TypedDict, +): + prompt: Literal[ + "additional_fleet_data_1", + "additional_fleet_data_2", + "driver_id", + "employee_number", + "entered_data_alphanumeric", + "entered_data_numeric", + "generic_id", + "invoice_number", + "odometer", + "postal_code", + "reefer_hours", + "replacement_car", + "trailer_number", + "trip_number", + "unit_number", + "vehicle_id", + "vehicle_tag", + "work_order", + ] + """ + The prompt that the Terminal SDK displays to collect this Fleet value. + """ + receipt_behavior: NotRequired[Literal["omit", "print"]] + """ + Whether the collected value is printed on the receipt. Defaults to `omit`. + """ + value: Union[Literal[""], str] + """ + The value collected for this Fleet prompt. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails( TypedDict, ): @@ -7037,6 +7088,10 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscription_reference: NotRequired[str] + """ + The merchant's subscription identifier for this off-session charge. + """ class PaymentIntentUpdateParamsPaymentMethodOptionsPayto(TypedDict): diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 9e8c1b408..bc40495ac 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -133,7 +133,7 @@ class SetupIntentConfirmParams(RequestOptions): ] payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + The ID of a PaymentMethod to attach to this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntentConfirmParamsPaymentMethodData" diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 11bbcf604..be79a8d68 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -258,7 +258,7 @@ class SetupIntentCreateParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + The ID of a PaymentMethod to attach to this SetupIntent. """ payment_method_configuration: NotRequired[str] """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 5143c5b4d..10d51afe4 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -61,7 +61,7 @@ class SetupIntentModifyParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 2d9c78562..ee23fe2fb 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -60,7 +60,7 @@ class SetupIntentUpdateParams(TypedDict): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index ef8c63cde..cf6d2c63e 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -147,6 +147,10 @@ SessionCreateParamsPaymentMethodOptionsUsBankAccount as SessionCreateParamsPaymentMethodOptionsUsBankAccount, SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections as SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections, SessionCreateParamsPaymentMethodOptionsWechatPay as SessionCreateParamsPaymentMethodOptionsWechatPay, + SessionCreateParamsPaymentSettings as SessionCreateParamsPaymentSettings, + SessionCreateParamsPaymentSettingsApplicationFeeData as SessionCreateParamsPaymentSettingsApplicationFeeData, + SessionCreateParamsPaymentSettingsTransferData as SessionCreateParamsPaymentSettingsTransferData, + SessionCreateParamsPaymentSettingsTransferDataTransferAmount as SessionCreateParamsPaymentSettingsTransferDataTransferAmount, SessionCreateParamsPermissions as SessionCreateParamsPermissions, SessionCreateParamsPermissionsUpdate as SessionCreateParamsPermissionsUpdate, SessionCreateParamsPhoneNumberCollection as SessionCreateParamsPhoneNumberCollection, @@ -816,6 +820,22 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentSettings": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsPaymentSettingsApplicationFeeData": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsPaymentSettingsTransferData": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsPaymentSettingsTransferDataTransferAmount": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPermissions": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index ec60b4df9..f498b6ce5 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -374,6 +374,10 @@ class SessionCreateParams(RequestOptions): """ Payment-method-specific configuration. """ + payment_settings: NotRequired["SessionCreateParamsPaymentSettings"] + """ + A subset of parameters to configure the payment for this Checkout Session. + """ permissions: NotRequired["SessionCreateParamsPermissions"] """ This property is used to set up permissions for various actions (for example, update) on the CheckoutSession object. Can only be set when creating `embedded_page` or `elements` sessions. @@ -2972,6 +2976,106 @@ class SessionCreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ +class SessionCreateParamsPaymentSettings(TypedDict): + application_fee_data: NotRequired[ + "SessionCreateParamsPaymentSettingsApplicationFeeData" + ] + """ + Configures an application fee transferred to the application owner's Stripe account. + """ + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']|str" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] + """ + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment + method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the + customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the + customer that their payment details will be saved and used for future + payments. + + If a Customer has been provided or Checkout creates a new Customer, + Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached + to a Customer. To reuse the payment method, you can retrieve it from the + Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` + to dynamically optimize your payment flow and comply with regional + legislation and network rules, such as SCA. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + transfer_data: NotRequired[ + "SessionCreateParamsPaymentSettingsTransferData" + ] + """ + Configures automatic transfers to a connected account when payments succeed. + """ + transfer_group: NotRequired[str] + """ + A string that identifies the initial payment as part of a group. + """ + + +class SessionCreateParamsPaymentSettingsApplicationFeeData(TypedDict): + initial_amount: NotRequired[int] + """ + The amount of the application fee, in the currency's smallest unit, to apply to the initial payment and transfer to the application owner's Stripe account. The application fee is capped at the total amount captured. + """ + percentage_decimal: NotRequired[Decimal] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of each payment total that will be transferred to the application owner's Stripe account. + """ + + +class SessionCreateParamsPaymentSettingsTransferData(TypedDict): + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ + transfer_amount: NotRequired[ + "SessionCreateParamsPaymentSettingsTransferDataTransferAmount" + ] + """ + Configures how much of each payment is transferred to the destination account. If omitted, the entire amount is transferred. + """ + + +class SessionCreateParamsPaymentSettingsTransferDataTransferAmount(TypedDict): + initial_amount: NotRequired[int] + """ + The amount, in the currency's smallest unit, that will be transferred to the destination account when the initial payment succeeds. + """ + percentage_decimal: NotRequired[Decimal] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of each payment total that will be transferred to the destination account. + """ + + class SessionCreateParamsPermissions(TypedDict): update: NotRequired["SessionCreateParamsPermissionsUpdate"] """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index 4abfce70b..a39a2ccb9 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -373,6 +373,7 @@ class SessionModifyParamsPaymentIntentData(TypedDict): When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + You must wrap any Checkout Session update that mutates `setup_future_usage` in [`runServerUpdate`](https://docs.stripe.com/js/custom_checkout/run_server_update) and await it before continuing with the payment. Pass an empty string to remove a previously supplied configuration. """ statement_descriptor: NotRequired["Literal['']|str"] diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 4f501de18..2b5d920b6 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -372,6 +372,7 @@ class SessionUpdateParamsPaymentIntentData(TypedDict): When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + You must wrap any Checkout Session update that mutates `setup_future_usage` in [`runServerUpdate`](https://docs.stripe.com/js/custom_checkout/run_server_update) and await it before continuing with the payment. Pass an empty string to remove a previously supplied configuration. """ statement_descriptor: NotRequired["Literal['']|str"] diff --git a/stripe/params/radar/__init__.py b/stripe/params/radar/__init__.py index 3176dca23..726faaa0e 100644 --- a/stripe/params/radar/__init__.py +++ b/stripe/params/radar/__init__.py @@ -87,6 +87,7 @@ PaymentEvaluationCreateParamsPaymentDetails as PaymentEvaluationCreateParamsPaymentDetails, PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails as PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails, PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard as PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard, + PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsUsBankAccount as PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsUsBankAccount, PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails as PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails, PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails as PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails, PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress as PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress, @@ -361,6 +362,10 @@ "stripe.params.radar._payment_evaluation_create_params", False, ), + "PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsUsBankAccount": ( + "stripe.params.radar._payment_evaluation_create_params", + False, + ), "PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails": ( "stripe.params.radar._payment_evaluation_create_params", False, diff --git a/stripe/params/radar/_payment_evaluation_create_params.py b/stripe/params/radar/_payment_evaluation_create_params.py index 225993d15..42fa5224f 100644 --- a/stripe/params/radar/_payment_evaluation_create_params.py +++ b/stripe/params/radar/_payment_evaluation_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -136,10 +136,16 @@ class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails( """ Describes card money movement details. """ - money_movement_type: Literal["card"] + money_movement_type: Union[Literal["card", "us_bank_account"], str] """ Describes the type of money movement. """ + us_bank_account: NotRequired[ + "PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsUsBankAccount" + ] + """ + Describes US bank account money movement details. + """ class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard( @@ -157,6 +163,19 @@ class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard( """ +class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsUsBankAccount( + TypedDict, +): + customer_presence: NotRequired["Literal['off_session', 'on_session']|str"] + """ + Describes the presence of the customer during the payment. + """ + payment_type: NotRequired[Literal["one_off", "recurring"]] + """ + Describes the type of US bank account payment. + """ + + class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails( TypedDict, ): diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index dde67f6cb..31a88d10c 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -2035,7 +2035,7 @@ class RegistrationCreateParamsCountryOptionsUsStateSalesTax(TypedDict): class RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): jurisdiction: NotRequired[str] """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. """ type: Union[ Literal[ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index 9968af464..f87dbf14d 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -76,9 +76,16 @@ from stripe.params.v2.money_management._financial_address_retrieve_params import ( FinancialAddressRetrieveParams as FinancialAddressRetrieveParams, ) + from stripe.params.v2.money_management._funding_session_create_params import ( + FundingSessionCreateParams as FundingSessionCreateParams, + FundingSessionCreateParamsFinancialAddressOptions as FundingSessionCreateParamsFinancialAddressOptions, + FundingSessionCreateParamsFinancialAddressOptionsCryptoWallet as FundingSessionCreateParamsFinancialAddressOptionsCryptoWallet, + ) from stripe.params.v2.money_management._inbound_transfer_create_params import ( InboundTransferCreateParams as InboundTransferCreateParams, InboundTransferCreateParamsFrom as InboundTransferCreateParamsFrom, + InboundTransferCreateParamsNetworkDetails as InboundTransferCreateParamsNetworkDetails, + InboundTransferCreateParamsNetworkDetailsAch as InboundTransferCreateParamsNetworkDetailsAch, InboundTransferCreateParamsTo as InboundTransferCreateParamsTo, ) from stripe.params.v2.money_management._inbound_transfer_list_params import ( @@ -411,6 +418,18 @@ "stripe.params.v2.money_management._financial_address_retrieve_params", False, ), + "FundingSessionCreateParams": ( + "stripe.params.v2.money_management._funding_session_create_params", + False, + ), + "FundingSessionCreateParamsFinancialAddressOptions": ( + "stripe.params.v2.money_management._funding_session_create_params", + False, + ), + "FundingSessionCreateParamsFinancialAddressOptionsCryptoWallet": ( + "stripe.params.v2.money_management._funding_session_create_params", + False, + ), "InboundTransferCreateParams": ( "stripe.params.v2.money_management._inbound_transfer_create_params", False, @@ -419,6 +438,14 @@ "stripe.params.v2.money_management._inbound_transfer_create_params", False, ), + "InboundTransferCreateParamsNetworkDetails": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), + "InboundTransferCreateParamsNetworkDetailsAch": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), "InboundTransferCreateParamsTo": ( "stripe.params.v2.money_management._inbound_transfer_create_params", False, diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py index 45a13e6ec..d152bcc33 100644 --- a/stripe/params/v2/money_management/_financial_address_create_params.py +++ b/stripe/params/v2/money_management/_financial_address_create_params.py @@ -5,22 +5,20 @@ class FinancialAddressCreateParams(TypedDict): + account: NotRequired[str] + """ + The ID of the Account that owns this FinancialAddress. + """ bank_account: NotRequired["FinancialAddressCreateParamsBankAccount"] """ Properties for creating a bank account FinancialAddress. """ crypto_wallet: NotRequired["FinancialAddressCreateParamsCryptoWallet"] - """ - Properties for creating a crypto wallet FinancialAddress. - """ financial_account: str """ The ID of the FinancialAccount the new FinancialAddress should be associated with. """ settlement_currency: NotRequired[str] - """ - Open Enum. The currency the FinancialAddress settles into the FinancialAccount. - """ type: Union[Literal["bank_account", "crypto_wallet"], str] """ The type of FinancialAddress to create. Must agree with which branch of financial_address_type_properties is set. @@ -32,7 +30,9 @@ class FinancialAddressCreateParamsBankAccount(TypedDict): """ The country for the bank account. Used to select the appropriate rails (e.g. for SEPA). """ - currency: Union[Literal["cad", "eur", "gbp", "mxn", "usd"], str] + currency: Union[ + Literal["brl", "cad", "cop", "eur", "gbp", "mxn", "usd"], str + ] """ The currency of the bank account to provision. """ @@ -44,6 +44,7 @@ class FinancialAddressCreateParamsCryptoWallet(TypedDict): "arbitrum", "avalanche_c_chain", "base", + "bitcoin", "ethereum", "optimism", "polygon", diff --git a/stripe/params/v2/money_management/_financial_address_list_params.py b/stripe/params/v2/money_management/_financial_address_list_params.py index f0599762b..972e4c6ef 100644 --- a/stripe/params/v2/money_management/_financial_address_list_params.py +++ b/stripe/params/v2/money_management/_financial_address_list_params.py @@ -4,6 +4,10 @@ class FinancialAddressListParams(TypedDict): + account: NotRequired[str] + """ + The ID of the Account that owns the FinancialAddresses. + """ financial_account: NotRequired[str] """ The ID of the FinancialAccount for which FinancialAddresses are to be returned. diff --git a/stripe/params/v2/money_management/_funding_session_create_params.py b/stripe/params/v2/money_management/_funding_session_create_params.py new file mode 100644 index 000000000..26a421ff1 --- /dev/null +++ b/stripe/params/v2/money_management/_funding_session_create_params.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class FundingSessionCreateParams(TypedDict): + account: str + """ + The ID of the Account that owns the FinancialAccount. Required. + """ + financial_account: str + """ + The ID of the FinancialAccount to fund. Required. + """ + financial_address_options: ( + "FundingSessionCreateParamsFinancialAddressOptions" + ) + """ + Per-type options used when creating the FinancialAddress. Required. + """ + financial_address_types: List[ + Union[Literal["bank_account", "crypto_wallet"], str] + ] + """ + Open Enum. The types of FinancialAddress that can be funded in this session. At least one is required. + """ + return_url: str + """ + The URL the customer is redirected to after completing or abandoning the funding session. Required. + """ + + +class FundingSessionCreateParamsFinancialAddressOptions(TypedDict): + crypto_wallet: NotRequired[ + "FundingSessionCreateParamsFinancialAddressOptionsCryptoWallet" + ] + """ + Options for a crypto wallet FinancialAddress. Required if `crypto_wallet` is requested. + """ + + +class FundingSessionCreateParamsFinancialAddressOptionsCryptoWallet(TypedDict): + settlement_currency: str + """ + Open Enum. The currency the crypto wallet FinancialAddress settles into the FinancialAccount. Required. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py index 112b7cd87..cdd8c75d6 100644 --- a/stripe/params/v2/money_management/_inbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -18,6 +18,10 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): """ An optional, freeform description field intended to store metadata. """ + network_details: NotRequired["InboundTransferCreateParamsNetworkDetails"] + """ + Network-specific details for the InboundTransfer. + """ statement_descriptor: NotRequired[str] """ An optional statement descriptor surfaced on the payer's bank statement. Max 10 characters. @@ -41,6 +45,21 @@ class InboundTransferCreateParamsFrom(TypedDict): """ +class InboundTransferCreateParamsNetworkDetails(TypedDict): + ach: "InboundTransferCreateParamsNetworkDetailsAch" + """ + ACH-specific network details. Only applied when the transfer routes over ACH. + """ + + +class InboundTransferCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + Optional freeform payment-related information written into the type-7 ACH + addenda record of the NACHA submission. Max 80 characters. + """ + + class InboundTransferCreateParamsTo(TypedDict): currency: str """ diff --git a/stripe/radar/__init__.py b/stripe/radar/__init__.py index 2a6f65a74..b96517220 100644 --- a/stripe/radar/__init__.py +++ b/stripe/radar/__init__.py @@ -40,6 +40,7 @@ from stripe.radar._payment_evaluation_service import ( PaymentEvaluationService as PaymentEvaluationService, ) + from stripe.radar._rule import Rule as Rule from stripe.radar._value_list import ValueList as ValueList from stripe.radar._value_list_item import ValueListItem as ValueListItem from stripe.radar._value_list_item_service import ( @@ -84,6 +85,7 @@ "stripe.radar._payment_evaluation_service", False, ), + "Rule": ("stripe.radar._rule", False), "ValueList": ("stripe.radar._value_list", False), "ValueListItem": ("stripe.radar._value_list_item", False), "ValueListItemService": ("stripe.radar._value_list_item_service", False), diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index ef40ecc54..efe23cc6a 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -11,6 +11,7 @@ from stripe.params.radar._payment_evaluation_create_params import ( PaymentEvaluationCreateParams, ) + from stripe.radar._rule import Rule class PaymentEvaluation(CreateableAPIResource["PaymentEvaluation"]): @@ -371,15 +372,34 @@ class Card(StripeObject): Describes the type of payment. """ + class UsBankAccount(StripeObject): + customer_presence: Optional[ + Union[Literal["off_session", "on_session"], str] + ] + """ + Describes the presence of the customer during the payment. + """ + payment_type: Optional[Literal["one_off", "recurring"]] + """ + Describes the type of US bank account payment. + """ + card: Optional[Card] """ Describes card money movement details. """ - money_movement_type: Literal["card"] + money_movement_type: Union[Literal["card", "us_bank_account"], str] """ Describes the type of money movement. """ - _inner_class_types = {"card": Card} + us_bank_account: Optional[UsBankAccount] + """ + Describes US bank account money movement details. + """ + _inner_class_types = { + "card": Card, + "us_bank_account": UsBankAccount, + } class PaymentMethodDetails(StripeObject): class BillingDetails(StripeObject): @@ -537,7 +557,41 @@ class Address(StripeObject): "shipping_details": ShippingDetails, } + class Rules(StripeObject): + matched: Optional[List[ExpandableField["Rule"]]] + """ + List of Radar rule tokens that matched during evaluation. Expandable to full rule objects. + """ + selected: Optional[ExpandableField["Rule"]] + """ + The Radar rule token selected as the decisive rule for this evaluation. Expandable to the full rule object. + """ + class Signals(StripeObject): + class BankInitiatedReturn(StripeObject): + evaluated_at: int + """ + The time when this signal was evaluated. + """ + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, + ] + """ + Risk level of this signal, based on the score. + """ + score: Optional[float] + """ + Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true. + """ + class EarlyFraudWarning(StripeObject): evaluated_at: int """ @@ -610,6 +664,10 @@ class FraudulentPayment(StripeObject): Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true. """ + bank_initiated_return: Optional[BankInitiatedReturn] + """ + The likelihood that this `PaymentEvaluation` results in a bank-initiated return. + """ early_fraud_warning: Optional[EarlyFraudWarning] """ The likelihood that this `PaymentEvaluation` results in an early fraud warning. @@ -623,6 +681,7 @@ class FraudulentPayment(StripeObject): A payment evaluation signal with evaluated_at, risk_level, and score fields. """ _inner_class_types = { + "bank_initiated_return": BankInitiatedReturn, "early_fraud_warning": EarlyFraudWarning, "fraudulent_dispute": FraudulentDispute, "fraudulent_payment": FraudulentPayment, @@ -668,10 +727,16 @@ class FraudulentPayment(StripeObject): """ Payment details attached to this payment evaluation. """ - recommended_action: Union[Literal["block", "continue"], str] + recommended_action: Union[ + Literal["block", "continue", "request_three_d_secure", "reroute"], str + ] """ Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`. """ + rules: Optional[Rules] + """ + Details about Radar Rules associated with the payment evaluation. + """ signals: Signals """ Collection of signals for this payment evaluation. @@ -715,5 +780,6 @@ async def create_async( "events": Event, "outcome": Outcome, "payment_details": PaymentDetails, + "rules": Rules, "signals": Signals, } diff --git a/stripe/radar/_rule.py b/stripe/radar/_rule.py new file mode 100644 index 000000000..01038ba40 --- /dev/null +++ b/stripe/radar/_rule.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class Rule(StripeObject): + OBJECT_NAME: ClassVar[Literal["radar.rule"]] = "radar.rule" + action: str + """ + The action taken on the payment. + """ + id: str + """ + Unique identifier for the object. + """ + object: Optional[Literal["radar.rule"]] + """ + String representing the object's type. Objects of the same type share the same value. + """ + predicate: Optional[str] + """ + The predicate to evaluate the payment against. + """ diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py index 5c634ffb6..0c5891a39 100644 --- a/stripe/v2/_money_management_service.py +++ b/stripe/v2/_money_management_service.py @@ -23,6 +23,9 @@ from stripe.v2.money_management._financial_address_service import ( FinancialAddressService, ) + from stripe.v2.money_management._funding_session_service import ( + FundingSessionService, + ) from stripe.v2.money_management._inbound_transfer_service import ( InboundTransferService, ) @@ -94,6 +97,10 @@ "stripe.v2.money_management._financial_address_service", "FinancialAddressService", ], + "funding_sessions": [ + "stripe.v2.money_management._funding_session_service", + "FundingSessionService", + ], "inbound_transfers": [ "stripe.v2.money_management._inbound_transfer_service", "InboundTransferService", @@ -164,6 +171,7 @@ class MoneyManagementService(StripeService): earned_credits: "EarnedCreditService" financial_accounts: "FinancialAccountService" financial_addresses: "FinancialAddressService" + funding_sessions: "FundingSessionService" inbound_transfers: "InboundTransferService" outbound_payments: "OutboundPaymentService" outbound_payment_quotes: "OutboundPaymentQuoteService" diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py index 106123af8..edda52714 100644 --- a/stripe/v2/money_management/__init__.py +++ b/stripe/v2/money_management/__init__.py @@ -63,6 +63,12 @@ from stripe.v2.money_management._financial_address_service import ( FinancialAddressService as FinancialAddressService, ) + from stripe.v2.money_management._funding_session import ( + FundingSession as FundingSession, + ) + from stripe.v2.money_management._funding_session_service import ( + FundingSessionService as FundingSessionService, + ) from stripe.v2.money_management._inbound_transfer import ( InboundTransfer as InboundTransfer, ) @@ -225,6 +231,11 @@ "stripe.v2.money_management._financial_address_service", False, ), + "FundingSession": ("stripe.v2.money_management._funding_session", False), + "FundingSessionService": ( + "stripe.v2.money_management._funding_session_service", + False, + ), "InboundTransfer": ("stripe.v2.money_management._inbound_transfer", False), "InboundTransferService": ( "stripe.v2.money_management._inbound_transfer_service", diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index 7eec97791..332de82fe 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, Union +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -80,43 +80,16 @@ class AccountHolderAddress(StripeObject): class Clabe(StripeObject): account_holder_name: str - """ - The name of the account holder. - """ clabe: str - """ - The CLABE interbank code. - """ class Cpa(StripeObject): account_holder_name: str - """ - The name of the account holder. - """ account_number: Optional[str] - """ - The full account number. - """ bank_name: str - """ - The name of the bank. - """ bic: Optional[str] - """ - The SWIFT/BIC code. - """ institution_number: str - """ - The institution number. - """ last4: str - """ - The last four digits of the account number. - """ transit_number: str - """ - The transit number. - """ class Iban(StripeObject): account_holder_name: str @@ -175,17 +148,11 @@ class SortCode(StripeObject): ABA bank account details (US). """ clabe: Optional[Clabe] - """ - CLABE bank account details (Mexico). - """ country: Optional[str] """ The country of the bank account. """ cpa: Optional[Cpa] - """ - CPA bank account details (Canada). - """ currency: str """ Open Enum. The currency of the bank account. @@ -198,7 +165,12 @@ class SortCode(StripeObject): """ Sort code bank account details (UK). """ - type: Union[Literal["aba", "clabe", "cpa", "iban", "sort_code"], str] + type: Union[ + Literal[ + "aba", "bre_b", "clabe", "cpa", "iban", "pix", "sort_code" + ], + str, + ] """ Open Enum. The type of bank account details. """ @@ -211,19 +183,22 @@ class SortCode(StripeObject): } class CryptoWallet(StripeObject): + class SupportedNetworkDetails(StripeObject): + supported_token_currencies: List[ + Union[Literal["btc", "eth", "sol", "usdc", "usdt"], str] + ] + """ + The token currencies supported on this network. + """ + address: str - """ - The blockchain wallet address. - """ memo: Optional[str] - """ - An optional memo or tag required by some networks to identify the recipient. - """ network: Union[ Literal[ "arbitrum", "avalanche_c_chain", "base", + "bitcoin", "ethereum", "optimism", "polygon", @@ -233,10 +208,19 @@ class CryptoWallet(StripeObject): ], str, ] + supported_network_details: UntypedStripeObject[SupportedNetworkDetails] """ - Open Enum. The blockchain network of the crypto wallet. + A map of supported network names to their details, including supported token currencies. """ + _inner_class_types = { + "supported_network_details": SupportedNetworkDetails, + } + _inner_class_dicts = ["supported_network_details"] + account: Optional[str] + """ + The ID of the Account that owns this FinancialAddress. + """ bank_account: Optional[BankAccount] """ Bank account details for this FinancialAddress. @@ -246,9 +230,6 @@ class CryptoWallet(StripeObject): The creation timestamp of the FinancialAddress. """ crypto_wallet: Optional[CryptoWallet] - """ - Crypto wallet details for this FinancialAddress. - """ financial_account: str """ The ID of the FinancialAccount this FinancialAddress corresponds to. @@ -266,9 +247,6 @@ class CryptoWallet(StripeObject): String representing the object's type. Objects of the same type share the same value of the object field. """ settlement_currency: Optional[str] - """ - Open Enum. The currency the FinancialAddress settles into the FinancialAccount. - """ status: Literal["active", "archived", "failed", "pending"] """ Closed Enum. The status of the FinancialAddress. diff --git a/stripe/v2/money_management/_funding_session.py b/stripe/v2/money_management/_funding_session.py new file mode 100644 index 000000000..ad8dc3ee0 --- /dev/null +++ b/stripe/v2/money_management/_funding_session.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class FundingSession(StripeObject): + """ + A FundingSession is a hosted funding surface for a customer to fund a FinancialAccount. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.funding_session"]] = ( + "v2.money_management.funding_session" + ) + + class FinancialAddressOptions(StripeObject): + class CryptoWallet(StripeObject): + settlement_currency: str + """ + Open Enum. The currency the crypto wallet FinancialAddress settles into the FinancialAccount. Required. + """ + + crypto_wallet: Optional[CryptoWallet] + """ + Options for a crypto wallet FinancialAddress. Required if `crypto_wallet` is requested. + """ + _inner_class_types = {"crypto_wallet": CryptoWallet} + + account: str + """ + The ID of the Account that owns the FinancialAccount. + """ + created: str + """ + The creation timestamp of the FundingSession. + """ + financial_account: str + """ + The ID of the FinancialAccount this FundingSession funds. + """ + financial_address_options: FinancialAddressOptions + """ + Per-type options used when creating the FinancialAddress. + """ + financial_address_types: List[ + Union[Literal["bank_account", "crypto_wallet"], str] + ] + """ + Open Enum. The types of FinancialAddress that can be funded in this session. + """ + id: str + """ + The ID of the FundingSession. ID prefix: `fndsess`. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.funding_session"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + return_url: str + """ + The URL the customer is redirected to after completing (or abandoning) the funding session. + """ + url: str + """ + The short-lived hosted funding URL the customer visits to fund the FinancialAccount. + """ + _inner_class_types = {"financial_address_options": FinancialAddressOptions} diff --git a/stripe/v2/money_management/_funding_session_service.py b/stripe/v2/money_management/_funding_session_service.py new file mode 100644 index 000000000..d50698219 --- /dev/null +++ b/stripe/v2/money_management/_funding_session_service.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._funding_session_create_params import ( + FundingSessionCreateParams, + ) + from stripe.v2.money_management._funding_session import FundingSession + + +class FundingSessionService(StripeService): + def create( + self, + params: "FundingSessionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "FundingSession": + """ + Create a FundingSession: a hosted funding surface for a customer to fund a FinancialAccount. + """ + return cast( + "FundingSession", + self._request( + "post", + "/v2/money_management/funding_sessions", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "FundingSessionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "FundingSession": + """ + Create a FundingSession: a hosted funding surface for a customer to fund a FinancialAccount. + """ + return cast( + "FundingSession", + await self._request_async( + "post", + "/v2/money_management/funding_sessions", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 0ff3ab4a6..dcf087c54 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -37,6 +37,19 @@ class PaymentMethod(StripeObject): """ _inner_class_types = {"payment_method": PaymentMethod} + class NetworkDetails(StripeObject): + class Ach(StripeObject): + addenda: Optional[str] + """ + Freeform payment-related information from the type-7 ACH addenda record. Echoes the submitted value. + """ + + ach: Ach + """ + ACH-specific network details. + """ + _inner_class_types = {"ach": Ach} + class To(StripeObject): credited: Amount """ @@ -164,6 +177,10 @@ class BankDebitSucceeded(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + network_details: Optional[NetworkDetails] + """ + Network-specific details for the InboundTransfer. Present only when supplied at creation. + """ object: Literal["v2.money_management.inbound_transfer"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -186,6 +203,7 @@ class BankDebitSucceeded(StripeObject): """ _inner_class_types = { "from": From, + "network_details": NetworkDetails, "to": To, "transfer_history": TransferHistory, } diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index 3a72f28e0..41a6920b1 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -481,6 +481,35 @@ class CryptoWallet(StripeObject): "arbitrum", "avalanche_c_chain", "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, + ] + """ + The network the crypto was received from. + """ + + class OriginatingCryptoWallet(StripeObject): + address: str + """ + The address of the wallet the crypto was received from. + """ + memo: str + """ + A memo also for identifying the recipient for memo-based blockchains (e.g., Stellar),. + """ + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "bitcoin", "ethereum", "optimism", "polygon", @@ -502,15 +531,45 @@ class CryptoWallet(StripeObject): """ Financial Address on which funds for ReceivedCredit were received. """ + originating_crypto_wallet: Optional[OriginatingCryptoWallet] + """ + Hash containing details about the crypto wallet that originated this ReceivedCredit. + """ statement_descriptor: Optional[str] """ Freeform string set by originator of the external ReceivedCredit. """ + token_currency: Optional[ + Union[ + Literal[ + "btc", + "cash", + "eth", + "ousd", + "sol", + "usdc", + "usdg", + "usdsui", + "usdt", + ], + str, + ] + ] + """ + Open Enum. The currency of the crypto tokens received. + """ + transaction_hash: Optional[str] + """ + Hash of the deposit transaction on-chain (incoming to Stripe). + """ type: Union[Literal["crypto_wallet"], str] """ Open Enum. The type of crypto wallet transfer that originated this ReceivedCredit. """ - _inner_class_types = {"crypto_wallet": CryptoWallet} + _inner_class_types = { + "crypto_wallet": CryptoWallet, + "originating_crypto_wallet": OriginatingCryptoWallet, + } class StatusDetails(StripeObject): class Failed(StripeObject): diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index c60e93dc1..d90893cdb 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -48522,6 +48522,38 @@ def test_v2_money_management_financial_address_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_money_management_funding_session_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/funding_sessions", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.funding_sessions.create( + { + "account": "account", + "financial_account": "financial_account", + "financial_address_options": { + "crypto_wallet": {"settlement_currency": "usd"}, + }, + "financial_address_types": ["bank_account"], + "return_url": "return_url", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/funding_sessions", + query_string="", + api_base="https://api.stripe.com", + post_data='{"account":"account","financial_account":"financial_account","financial_address_options":{"crypto_wallet":{"settlement_currency":"usd"}},"financial_address_types":["bank_account"],"return_url":"return_url"}', + is_json=True, + ) + def test_v2_money_management_inbound_transfer_get_service( self, http_client_mock: HTTPClientMock ) -> None: