diff --git a/CHANGELOG.md b/CHANGELOG.md index 875b72d67..81c30cb91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ * Add support for `en-RO` on enums `stripe.Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarna.preferred_locale` and `stripe.Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna.preferred_locale` * Add support for `ro-RO` on enums `stripe.Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarna.preferred_locale` and `stripe.Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna.preferred_locale` +## 9.9.0 - 2024-05-30 +* [#1335](https://github.com/stripe/stripe-python/pull/1335) Add method to list invoice line items + * Add methods `list_lines()` and `list_lines_async()` on the class `Invoice` to list the invoice line items +* [#1336](https://github.com/stripe/stripe-python/pull/1336) Update generated code + * Add support for `generated_from` on resource classes `stripe.ConfirmationToken.PaymentMethodPreview.Card` and `stripe.PaymentMethod.Card` + * Add support for `default_value` on parameter classes `stripe.checkout.Session.CreateParamsCustomFieldDropdown`, `stripe.checkout.Session.CreateParamsCustomFieldNumeric`, and `stripe.checkout.Session.CreateParamsCustomFieldText` and resource classes `stripe.checkout.Session.CustomField.Dropdown`, `stripe.checkout.Session.CustomField.Numeric`, and `stripe.checkout.Session.CustomField.Text` + * Add support for `verification_requires_additional_proof_of_registration` on enums `stripe.Account.FutureRequirements.Error.code`, `stripe.Account.Requirements.Error.code`, `stripe.BankAccount.FutureRequirements.Error.code`, `stripe.BankAccount.Requirements.Error.code`, `stripe.Capability.FutureRequirements.Error.code`, `stripe.Capability.Requirements.Error.code`, `stripe.Person.FutureRequirements.Error.code`, and `stripe.Person.Requirements.Error.code` + * Add support for `issuing_personalization_design.activated` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `issuing_personalization_design.deactivated` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `issuing_personalization_design.rejected` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `issuing_personalization_design.updated` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `en-RO` on enums `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna.preferred_locale`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsKlarna.preferred_locale`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna.preferred_locale` + * Add support for `ro-RO` on enums `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna.preferred_locale`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsKlarna.preferred_locale`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna.preferred_locale` + * Change type of `features` on `stripe.issuing.PhysicalBundle` from `Optional[Features]` to `Features` + ## 9.9.0b1 - 2024-05-23 * [#1331](https://github.com/stripe/stripe-python/pull/1331) Update generated code for beta * Change type of `refund` on `stripe.CreditNote.CreateParamsRefund`, `stripe.CreditNote.PreviewParamsRefund`, and `stripe.CreditNote.PreviewLinesParamsRefund` from `str` to `NotRequired[str]` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4161e81ad..8d1f4287e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1058 \ No newline at end of file +v1065 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 526d11b47..5f302b6b9 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -228,6 +228,12 @@ class Capabilities(StripeObject): """ The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. """ + gb_bank_transfer_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + """ giropay_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. @@ -250,6 +256,12 @@ class Capabilities(StripeObject): """ The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. """ + jp_bank_transfer_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + """ klarna_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. @@ -270,6 +282,12 @@ class Capabilities(StripeObject): """ The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. """ + mx_bank_transfer_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + """ oxxo_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. @@ -304,6 +322,12 @@ class Capabilities(StripeObject): """ The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. """ + sepa_bank_transfer_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + """ sepa_debit_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. @@ -346,6 +370,12 @@ class Capabilities(StripeObject): """ The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. """ + us_bank_transfer_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + """ zip_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the Zip capability of the account, or whether the account can directly process Zip charges. @@ -1569,6 +1599,12 @@ class CreateParamsCapabilities(TypedDict): """ The fpx_payments capability. """ + gb_bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesGbBankTransferPayments" + ] + """ + The gb_bank_transfer_payments capability. + """ giropay_payments: NotRequired[ "Account.CreateParamsCapabilitiesGiropayPayments" ] @@ -1599,6 +1635,12 @@ class CreateParamsCapabilities(TypedDict): """ The jcb_payments capability. """ + jp_bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesJpBankTransferPayments" + ] + """ + The jp_bank_transfer_payments capability. + """ klarna_payments: NotRequired[ "Account.CreateParamsCapabilitiesKlarnaPayments" ] @@ -1629,6 +1671,12 @@ class CreateParamsCapabilities(TypedDict): """ The mobilepay_payments capability. """ + mx_bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesMxBankTransferPayments" + ] + """ + The mx_bank_transfer_payments capability. + """ oxxo_payments: NotRequired[ "Account.CreateParamsCapabilitiesOxxoPayments" ] @@ -1677,6 +1725,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + sepa_bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesSepaBankTransferPayments" + ] + """ + The sepa_bank_transfer_payments capability. + """ sepa_debit_payments: NotRequired[ "Account.CreateParamsCapabilitiesSepaDebitPayments" ] @@ -1727,6 +1781,12 @@ class CreateParamsCapabilities(TypedDict): """ The us_bank_account_ach_payments capability. """ + us_bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesUsBankTransferPayments" + ] + """ + The us_bank_transfer_payments capability. + """ zip_payments: NotRequired[ "Account.CreateParamsCapabilitiesZipPayments" ] @@ -1830,6 +1890,12 @@ class CreateParamsCapabilitiesFpxPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesGbBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesGiropayPayments(TypedDict): requested: NotRequired[bool] """ @@ -1860,6 +1926,12 @@ class CreateParamsCapabilitiesJcbPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -1890,6 +1962,12 @@ class CreateParamsCapabilitiesMobilepayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -1938,6 +2016,12 @@ class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): requested: NotRequired[bool] """ @@ -1992,6 +2076,12 @@ class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesUsBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired[bool] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index eddcb7073..9fe720740 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -338,6 +338,12 @@ class CreateParamsCapabilities(TypedDict): """ The fpx_payments capability. """ + gb_bank_transfer_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesGbBankTransferPayments" + ] + """ + The gb_bank_transfer_payments capability. + """ giropay_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesGiropayPayments" ] @@ -368,6 +374,12 @@ class CreateParamsCapabilities(TypedDict): """ The jcb_payments capability. """ + jp_bank_transfer_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesJpBankTransferPayments" + ] + """ + The jp_bank_transfer_payments capability. + """ klarna_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesKlarnaPayments" ] @@ -398,6 +410,12 @@ class CreateParamsCapabilities(TypedDict): """ The mobilepay_payments capability. """ + mx_bank_transfer_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesMxBankTransferPayments" + ] + """ + The mx_bank_transfer_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesOxxoPayments" ] @@ -446,6 +464,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + sepa_bank_transfer_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesSepaBankTransferPayments" + ] + """ + The sepa_bank_transfer_payments capability. + """ sepa_debit_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesSepaDebitPayments" ] @@ -500,6 +524,12 @@ class CreateParamsCapabilities(TypedDict): """ The us_bank_account_ach_payments capability. """ + us_bank_transfer_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesUsBankTransferPayments" + ] + """ + The us_bank_transfer_payments capability. + """ zip_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesZipPayments" ] @@ -603,6 +633,12 @@ class CreateParamsCapabilitiesFpxPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesGbBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesGiropayPayments(TypedDict): requested: NotRequired[bool] """ @@ -633,6 +669,12 @@ class CreateParamsCapabilitiesJcbPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -663,6 +705,12 @@ class CreateParamsCapabilitiesMobilepayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -711,6 +759,12 @@ class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): requested: NotRequired[bool] """ @@ -765,6 +819,12 @@ class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesUsBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired[bool] """ @@ -2058,6 +2118,12 @@ class UpdateParamsCapabilities(TypedDict): """ The fpx_payments capability. """ + gb_bank_transfer_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesGbBankTransferPayments" + ] + """ + The gb_bank_transfer_payments capability. + """ giropay_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesGiropayPayments" ] @@ -2088,6 +2154,12 @@ class UpdateParamsCapabilities(TypedDict): """ The jcb_payments capability. """ + jp_bank_transfer_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesJpBankTransferPayments" + ] + """ + The jp_bank_transfer_payments capability. + """ klarna_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesKlarnaPayments" ] @@ -2118,6 +2190,12 @@ class UpdateParamsCapabilities(TypedDict): """ The mobilepay_payments capability. """ + mx_bank_transfer_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesMxBankTransferPayments" + ] + """ + The mx_bank_transfer_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesOxxoPayments" ] @@ -2166,6 +2244,12 @@ class UpdateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + sepa_bank_transfer_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesSepaBankTransferPayments" + ] + """ + The sepa_bank_transfer_payments capability. + """ sepa_debit_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesSepaDebitPayments" ] @@ -2220,6 +2304,12 @@ class UpdateParamsCapabilities(TypedDict): """ The us_bank_account_ach_payments capability. """ + us_bank_transfer_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesUsBankTransferPayments" + ] + """ + The us_bank_transfer_payments capability. + """ zip_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesZipPayments" ] @@ -2323,6 +2413,12 @@ class UpdateParamsCapabilitiesFpxPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesGbBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesGiropayPayments(TypedDict): requested: NotRequired[bool] """ @@ -2353,6 +2449,12 @@ class UpdateParamsCapabilitiesJcbPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesJpBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesKlarnaPayments(TypedDict): requested: NotRequired[bool] """ @@ -2383,6 +2485,12 @@ class UpdateParamsCapabilitiesMobilepayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesMxBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesOxxoPayments(TypedDict): requested: NotRequired[bool] """ @@ -2431,6 +2539,12 @@ class UpdateParamsCapabilitiesRevolutPayPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesSepaBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesSepaDebitPayments(TypedDict): requested: NotRequired[bool] """ @@ -2485,6 +2599,12 @@ class UpdateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesUsBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired[bool] """ diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 1bd84e423..151c9cafc 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -2,4 +2,4 @@ # File generated from our OpenAPI spec class _ApiVersion: CURRENT = "2024-04-10" - PREVIEW = "2024-04-11.preview-v2" + PREVIEW = "2024-05-23.preview-v2" diff --git a/stripe/_invoice.py b/stripe/_invoice.py index c53b7f3e6..0a319217a 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -801,6 +801,7 @@ class FinancialConnections(StripeObject): "sepa_credit_transfer", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ] @@ -1593,7 +1594,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -4224,7 +4225,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index f75948ef6..630740992 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -555,7 +555,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -5526,7 +5526,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 3bf337893..282996c06 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2108,6 +2108,16 @@ class Swish(StripeObject): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class Twint(StripeObject): + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class ManualEntry(StripeObject): @@ -2249,6 +2259,7 @@ class Zip(StripeObject): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] + twint: Optional[Twint] us_bank_account: Optional[UsBankAccount] wechat_pay: Optional[WechatPay] zip: Optional[Zip] @@ -2290,6 +2301,7 @@ class Zip(StripeObject): "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, + "twint": Twint, "us_bank_account": UsBankAccount, "wechat_pay": WechatPay, "zip": Zip, @@ -4799,6 +4811,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" ] @@ -5968,6 +5986,18 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" @@ -7915,6 +7945,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccount" ] @@ -9084,6 +9120,18 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" @@ -11088,6 +11136,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" ] @@ -12257,6 +12311,18 @@ class ModifyParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 4418fff30..dde54fbbf 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -2477,6 +2477,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccount" ] @@ -3646,6 +3652,18 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" @@ -5633,6 +5651,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccount" ] @@ -6802,6 +6826,18 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" @@ -8876,6 +8912,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. """ + twint: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccount" ] @@ -10045,6 +10087,18 @@ class UpdateParamsPaymentMethodOptionsSwish(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 09555afa4..f27d2c977 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -783,6 +783,7 @@ class FinancialConnections(StripeObject): "sepa_credit_transfer", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ] diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index da0980c46..bd20a1843 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -4498,7 +4498,7 @@ def _cls_cancel( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( "SetupIntent", @@ -4519,7 +4519,7 @@ def cancel( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ ... @@ -4530,7 +4530,7 @@ def cancel( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ ... @@ -4541,7 +4541,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( "SetupIntent", @@ -4561,7 +4561,7 @@ async def _cls_cancel_async( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( "SetupIntent", @@ -4582,7 +4582,7 @@ async def cancel_async( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ ... @@ -4593,7 +4593,7 @@ async def cancel_async( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ ... @@ -4604,7 +4604,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( "SetupIntent", diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 585be0342..19b72119b 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -3980,7 +3980,7 @@ def cancel( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( SetupIntent, @@ -4005,7 +4005,7 @@ async def cancel_async( """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. - After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. + After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ return cast( SetupIntent, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 8a06db291..7d08866ff 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -359,6 +359,7 @@ class FinancialConnections(StripeObject): "sepa_credit_transfer", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ] @@ -1033,7 +1034,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -1963,7 +1964,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 2e6cec4d5..a4de679cd 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -601,7 +601,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -1587,7 +1587,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index f554064b3..1fc8c8e94 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -3959,7 +3959,7 @@ class RetrieveParams(RequestOptions): """ payment_intent: Optional[ExpandableField["PaymentIntent"]] """ - The ID of the PaymentIntent for Checkout Sessions in `payment` mode. + The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ payment_link: Optional[ExpandableField["PaymentLink"]] """ @@ -4008,7 +4008,7 @@ class RetrieveParams(RequestOptions): """ setup_intent: Optional[ExpandableField["SetupIntent"]] """ - The ID of the SetupIntent for Checkout Sessions in `setup` mode. + The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. """ shipping_address_collection: Optional[ShippingAddressCollection] """ diff --git a/stripe/climate/_order.py b/stripe/climate/_order.py index 1a51fc668..354821c46 100644 --- a/stripe/climate/_order.py +++ b/stripe/climate/_order.py @@ -266,7 +266,7 @@ def _cls_cancel( cls, order: str, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -286,7 +286,7 @@ def _cls_cancel( @staticmethod def cancel(order: str, **params: Unpack["Order.CancelParams"]) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -296,7 +296,7 @@ def cancel(order: str, **params: Unpack["Order.CancelParams"]) -> "Order": @overload def cancel(self, **params: Unpack["Order.CancelParams"]) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -308,7 +308,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -329,7 +329,7 @@ async def _cls_cancel_async( cls, order: str, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -351,7 +351,7 @@ async def cancel_async( order: str, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -363,7 +363,7 @@ async def cancel_async( self, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -375,7 +375,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Order.CancelParams"] ) -> "Order": """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. diff --git a/stripe/climate/_order_service.py b/stripe/climate/_order_service.py index 6ee55084a..0df6d6ef3 100644 --- a/stripe/climate/_order_service.py +++ b/stripe/climate/_order_service.py @@ -269,7 +269,7 @@ def cancel( options: RequestOptions = {}, ) -> Order: """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. @@ -295,7 +295,7 @@ async def cancel_async( options: RequestOptions = {}, ) -> Order: """ - Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the + Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total. diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 011726e0a..bf07df5e4 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -493,7 +493,7 @@ def create_from_calculation( cls, **params: Unpack["Transaction.CreateFromCalculationParams"] ) -> "Transaction": """ - Creates a Tax Transaction from a calculation. + Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. """ return cast( "Transaction", @@ -509,7 +509,7 @@ async def create_from_calculation_async( cls, **params: Unpack["Transaction.CreateFromCalculationParams"] ) -> "Transaction": """ - Creates a Tax Transaction from a calculation. + Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. """ return cast( "Transaction", diff --git a/stripe/tax/_transaction_service.py b/stripe/tax/_transaction_service.py index d4d488996..de7ec3187 100644 --- a/stripe/tax/_transaction_service.py +++ b/stripe/tax/_transaction_service.py @@ -166,7 +166,7 @@ def create_from_calculation( options: RequestOptions = {}, ) -> Transaction: """ - Creates a Tax Transaction from a calculation. + Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. """ return cast( Transaction, @@ -186,7 +186,7 @@ async def create_from_calculation_async( options: RequestOptions = {}, ) -> Transaction: """ - Creates a Tax Transaction from a calculation. + Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. """ return cast( Transaction,