From 626a182340e3fe3e448d0ac4630320891fa87788 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:18:12 -0400 Subject: [PATCH 01/36] Update generated code (#1369) * Update generated code for v1157 * Update generated code for v1158 * Update generated code for v1159 * Update generated code for v1160 * Update generated code for v1162 * Update generated code for v1163 * Update generated code for v1166 * Update generated code for v1167 * Update generated code for v1169 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 6 +- stripe/_event.py | 1 + stripe/_invoice.py | 1 + stripe/_object_classes.py | 2 + stripe/_payment_intent.py | 527 ++++++++++++++---- stripe/_payment_intent_service.py | 448 +++++++++++---- stripe/_setup_attempt.py | 1 + stripe/_setup_intent.py | 5 +- stripe/_setup_intent_service.py | 2 +- stripe/_subscription.py | 4 +- stripe/_subscription_item.py | 2 +- stripe/_subscription_item_service.py | 2 +- stripe/_subscription_service.py | 4 +- stripe/_webhook_endpoint.py | 2 + stripe/_webhook_endpoint_service.py | 2 + stripe/api_resources/billing/__init__.py | 2 + stripe/api_resources/billing/alert.py | 21 + .../api_resources/billing/alert_triggered.py | 21 + stripe/billing/__init__.py | 2 + stripe/billing/_alert.py | 75 +++ stripe/billing/_alert_triggered.py | 38 ++ stripe/checkout/_session.py | 126 ++++- stripe/checkout/_session_service.py | 64 ++- stripe/financial_connections/_account.py | 4 +- 25 files changed, 1123 insertions(+), 241 deletions(-) create mode 100644 stripe/api_resources/billing/alert.py create mode 100644 stripe/api_resources/billing/alert_triggered.py create mode 100644 stripe/billing/_alert.py create mode 100644 stripe/billing/_alert_triggered.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0692ea662..03029e1c8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1155 \ No newline at end of file +v1169 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index f85fe819a..1e8eb2fe2 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -703,10 +703,6 @@ class ShippingAddress(StripeObject): """ The authorized amount. """ - authorization_code: Optional[str] - """ - Authorization code on the charge. - """ brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -2182,7 +2178,7 @@ class SearchParams(RequestOptions): billing_details: BillingDetails calculated_statement_descriptor: Optional[str] """ - The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This only works for card payments. """ captured: bool """ diff --git a/stripe/_event.py b/stripe/_event.py index 289246991..a54c62909 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -166,6 +166,7 @@ class RetrieveParams(RequestOptions): "application_fee.refund.updated", "application_fee.refunded", "balance.available", + "billing.alert.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 44b6d10ea..060db3786 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -351,6 +351,7 @@ class LastFinalizationError(StripeObject): "charge_already_refunded", "charge_disputed", "charge_exceeds_source_limit", + "charge_exceeds_transaction_limit", "charge_expired_for_capture", "charge_invalid_parameter", "charge_not_refundable", diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 62daa5bf0..c1d9e20d1 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -20,6 +20,8 @@ stripe.BankAccount.OBJECT_NAME: stripe.BankAccount, stripe.billing_portal.Configuration.OBJECT_NAME: stripe.billing_portal.Configuration, stripe.billing_portal.Session.OBJECT_NAME: stripe.billing_portal.Session, + stripe.billing.Alert.OBJECT_NAME: stripe.billing.Alert, + stripe.billing.AlertTriggered.OBJECT_NAME: stripe.billing.AlertTriggered, stripe.billing.Meter.OBJECT_NAME: stripe.billing.Meter, stripe.billing.MeterEvent.OBJECT_NAME: stripe.billing.MeterEvent, stripe.billing.MeterEventAdjustment.OBJECT_NAME: stripe.billing.MeterEventAdjustment, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 351db4d60..ab4123d8d 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -128,6 +128,7 @@ class LastPaymentError(StripeObject): "charge_already_refunded", "charge_disputed", "charge_exceeds_source_limit", + "charge_exceeds_transaction_limit", "charge_expired_for_capture", "charge_invalid_parameter", "charge_not_refundable", @@ -987,6 +988,8 @@ class MandateOptions(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: Optional[ @@ -1012,6 +1015,8 @@ class Affirm(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1031,6 +1036,8 @@ class AfterpayClearpay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1041,6 +1048,8 @@ class Alipay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1055,6 +1064,8 @@ class AmazonPay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1067,6 +1078,8 @@ class AuBecsDebit(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1079,6 +1092,8 @@ class BacsDebit(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1093,6 +1108,8 @@ class Bancontact(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1103,6 +1120,8 @@ class Blik(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1119,6 +1138,8 @@ class Boleto(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1279,6 +1300,8 @@ class MandateOptions(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ statement_descriptor_suffix_kana: Optional[str] @@ -1327,6 +1350,8 @@ class Cashapp(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1382,6 +1407,8 @@ class EuBankTransfer(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ _inner_class_types = {"bank_transfer": BankTransfer} @@ -1393,6 +1420,8 @@ class Eps(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1403,6 +1432,8 @@ class Fpx(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1413,6 +1444,8 @@ class Giropay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1423,6 +1456,8 @@ class Grabpay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1433,6 +1468,8 @@ class Ideal(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1454,6 +1491,8 @@ class Klarna(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1480,6 +1519,8 @@ class Konbini(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1498,6 +1539,8 @@ class Link(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1512,6 +1555,8 @@ class Mobilepay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1522,6 +1567,8 @@ class Multibanco(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1536,6 +1583,8 @@ class Oxxo(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1546,6 +1595,8 @@ class P24(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1556,6 +1607,8 @@ class Paynow(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1578,6 +1631,8 @@ class Paypal(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1596,6 +1651,8 @@ class Pix(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1606,6 +1663,8 @@ class Promptpay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1620,6 +1679,8 @@ class RevolutPay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1636,6 +1697,8 @@ class MandateOptions(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ _inner_class_types = {"mandate_options": MandateOptions} @@ -1653,6 +1716,8 @@ class Sofort(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1667,6 +1732,8 @@ class Swish(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1677,6 +1744,8 @@ class Twint(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1738,6 +1807,8 @@ class MandateOptions(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: Optional[ @@ -1766,6 +1837,8 @@ class WechatPay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1776,6 +1849,8 @@ class Zip(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2093,9 +2168,11 @@ class ConfirmParams(RequestOptions): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsShipping" @@ -3020,9 +3097,11 @@ class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -3072,9 +3151,11 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -3097,9 +3178,11 @@ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): @@ -3111,9 +3194,11 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -3133,6 +3218,8 @@ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3145,9 +3232,11 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -3159,9 +3248,11 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): @@ -3177,9 +3268,11 @@ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): @@ -3193,9 +3286,11 @@ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): @@ -3211,9 +3306,11 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): @@ -3305,9 +3402,11 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -3512,9 +3611,11 @@ class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -3534,9 +3635,11 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -3592,9 +3695,11 @@ class ConfirmParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): @@ -3604,9 +3709,11 @@ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): @@ -3616,9 +3723,11 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -3628,9 +3737,11 @@ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): @@ -3642,9 +3753,11 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -3718,9 +3831,11 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): @@ -3746,9 +3861,11 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): @@ -3772,9 +3889,11 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -3792,9 +3911,11 @@ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -3804,9 +3925,11 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): @@ -3820,9 +3943,11 @@ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): @@ -3832,9 +3957,11 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -3848,9 +3975,11 @@ class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): @@ -3902,9 +4031,11 @@ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): @@ -3922,9 +4053,11 @@ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -3934,9 +4067,11 @@ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -3956,6 +4091,8 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3974,9 +4111,11 @@ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -3997,9 +4136,11 @@ class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): @@ -4013,9 +4154,11 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): @@ -4025,9 +4168,11 @@ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -4063,9 +4208,11 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -4143,9 +4290,11 @@ class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): @@ -4155,9 +4304,11 @@ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsRadarOptions(TypedDict): @@ -4259,7 +4410,7 @@ class CreateParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4341,6 +4492,8 @@ class CreateParams(RequestOptions): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ shipping: NotRequired["PaymentIntent.CreateParamsShipping"] @@ -5293,9 +5446,11 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -5345,9 +5500,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -5370,9 +5527,11 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -5384,9 +5543,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -5406,6 +5567,8 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -5418,9 +5581,11 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -5432,9 +5597,11 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -5450,9 +5617,11 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBlik(TypedDict): @@ -5466,9 +5635,11 @@ class CreateParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -5484,9 +5655,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -5578,9 +5751,11 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -5785,9 +5960,11 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -5807,9 +5984,11 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -5865,9 +6044,11 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -5877,9 +6058,11 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -5889,9 +6072,11 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -5901,9 +6086,11 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -5915,9 +6102,11 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -5991,9 +6180,11 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -6019,9 +6210,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -6045,9 +6238,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -6065,9 +6260,11 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -6077,9 +6274,11 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -6093,9 +6292,11 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -6105,9 +6306,11 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -6121,9 +6324,11 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -6175,9 +6380,11 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -6195,9 +6402,11 @@ class CreateParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -6207,9 +6416,11 @@ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -6229,6 +6440,8 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -6247,9 +6460,11 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -6270,9 +6485,11 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -6286,9 +6503,11 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsTwint(TypedDict): @@ -6298,9 +6517,11 @@ class CreateParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -6336,9 +6557,11 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -6416,9 +6639,11 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsZip(TypedDict): @@ -6428,9 +6653,11 @@ class CreateParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsRadarOptions(TypedDict): @@ -6614,7 +6841,7 @@ class ModifyParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -6630,7 +6857,7 @@ class ModifyParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -6666,9 +6893,11 @@ class ModifyParams(RequestOptions): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired["Literal['']|PaymentIntent.ModifyParamsShipping"] """ @@ -7560,9 +7789,11 @@ class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -7612,9 +7843,11 @@ class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -7637,9 +7870,11 @@ class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): @@ -7651,9 +7886,11 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -7673,6 +7910,8 @@ class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -7685,9 +7924,11 @@ class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -7699,9 +7940,11 @@ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): @@ -7717,9 +7960,11 @@ class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBlik(TypedDict): @@ -7733,9 +7978,11 @@ class ModifyParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): @@ -7751,9 +7998,11 @@ class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCard(TypedDict): @@ -7845,9 +8094,11 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -8052,9 +8303,11 @@ class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -8074,9 +8327,11 @@ class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -8132,9 +8387,11 @@ class ModifyParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsFpx(TypedDict): @@ -8144,9 +8401,11 @@ class ModifyParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): @@ -8156,9 +8415,11 @@ class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -8168,9 +8429,11 @@ class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): @@ -8182,9 +8445,11 @@ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -8258,9 +8523,11 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): @@ -8286,9 +8553,11 @@ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsLink(TypedDict): @@ -8312,9 +8581,11 @@ class ModifyParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -8332,9 +8603,11 @@ class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -8344,9 +8617,11 @@ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): @@ -8360,9 +8635,11 @@ class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsP24(TypedDict): @@ -8372,9 +8649,11 @@ class ModifyParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -8388,9 +8667,11 @@ class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): @@ -8442,9 +8723,11 @@ class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPix(TypedDict): @@ -8462,9 +8745,11 @@ class ModifyParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -8474,9 +8759,11 @@ class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -8496,6 +8783,8 @@ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -8514,9 +8803,11 @@ class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -8537,9 +8828,11 @@ class ModifyParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsSwish(TypedDict): @@ -8553,9 +8846,11 @@ class ModifyParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsTwint(TypedDict): @@ -8565,9 +8860,11 @@ class ModifyParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -8603,9 +8900,11 @@ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -8683,9 +8982,11 @@ class ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsZip(TypedDict): @@ -8695,9 +8996,11 @@ class ModifyParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsShipping(TypedDict): @@ -8869,7 +9172,7 @@ class VerifyMicrodepositsParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: Optional[str] """ @@ -8947,6 +9250,8 @@ class VerifyMicrodepositsParams(RequestOptions): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ shipping: Optional[Shipping] diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 23fd5c18d..01ab18d7d 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -166,9 +166,11 @@ class ConfirmParams(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsShipping" @@ -1115,9 +1117,11 @@ class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -1167,9 +1171,11 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -1192,9 +1198,11 @@ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): @@ -1206,9 +1214,11 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -1228,6 +1238,8 @@ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1240,9 +1252,11 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -1254,9 +1268,11 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): @@ -1272,9 +1288,11 @@ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): @@ -1288,9 +1306,11 @@ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): @@ -1306,9 +1326,11 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): @@ -1400,9 +1422,11 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -1607,9 +1631,11 @@ class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -1629,9 +1655,11 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -1687,9 +1715,11 @@ class ConfirmParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): @@ -1699,9 +1729,11 @@ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): @@ -1711,9 +1743,11 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -1723,9 +1757,11 @@ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): @@ -1737,9 +1773,11 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -1813,9 +1851,11 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): @@ -1841,9 +1881,11 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): @@ -1867,9 +1909,11 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -1887,9 +1931,11 @@ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -1899,9 +1945,11 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): @@ -1915,9 +1963,11 @@ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): @@ -1927,9 +1977,11 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -1943,9 +1995,11 @@ class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): @@ -1997,9 +2051,11 @@ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): @@ -2017,9 +2073,11 @@ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -2029,9 +2087,11 @@ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -2051,6 +2111,8 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2069,9 +2131,11 @@ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -2092,9 +2156,11 @@ class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): @@ -2108,9 +2174,11 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): @@ -2120,9 +2188,11 @@ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -2158,9 +2228,11 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -2238,9 +2310,11 @@ class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): @@ -2250,9 +2324,11 @@ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsRadarOptions(TypedDict): @@ -2354,7 +2430,7 @@ class CreateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -2438,6 +2514,8 @@ class CreateParams(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ shipping: NotRequired["PaymentIntentService.CreateParamsShipping"] @@ -3414,9 +3492,11 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -3466,9 +3546,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -3491,9 +3573,11 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -3505,9 +3589,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -3527,6 +3613,8 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3539,9 +3627,11 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -3553,9 +3643,11 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -3571,9 +3663,11 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBlik(TypedDict): @@ -3587,9 +3681,11 @@ class CreateParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -3605,9 +3701,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -3699,9 +3797,11 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -3906,9 +4006,11 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -3928,9 +4030,11 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -3986,9 +4090,11 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -3998,9 +4104,11 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -4010,9 +4118,11 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -4022,9 +4132,11 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -4036,9 +4148,11 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -4112,9 +4226,11 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -4140,9 +4256,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -4166,9 +4284,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -4186,9 +4306,11 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -4198,9 +4320,11 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -4214,9 +4338,11 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -4226,9 +4352,11 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -4242,9 +4370,11 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -4296,9 +4426,11 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -4316,9 +4448,11 @@ class CreateParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -4328,9 +4462,11 @@ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -4350,6 +4486,8 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -4368,9 +4506,11 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -4391,9 +4531,11 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -4407,9 +4549,11 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsTwint(TypedDict): @@ -4419,9 +4563,11 @@ class CreateParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -4457,9 +4603,11 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -4537,9 +4685,11 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsZip(TypedDict): @@ -4549,9 +4699,11 @@ class CreateParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsRadarOptions(TypedDict): @@ -4763,7 +4915,7 @@ class UpdateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4779,7 +4931,7 @@ class UpdateParams(TypedDict): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -4815,9 +4967,11 @@ class UpdateParams(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsShipping" @@ -5735,9 +5889,11 @@ class UpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -5787,9 +5943,11 @@ class UpdateParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -5812,9 +5970,11 @@ class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -5826,9 +5986,11 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -5848,6 +6010,8 @@ class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -5860,9 +6024,11 @@ class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -5874,9 +6040,11 @@ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -5892,9 +6060,11 @@ class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBlik(TypedDict): @@ -5908,9 +6078,11 @@ class UpdateParamsPaymentMethodOptionsBlik(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -5926,9 +6098,11 @@ class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCard(TypedDict): @@ -6020,9 +6194,11 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -6227,9 +6403,11 @@ class UpdateParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -6249,9 +6427,11 @@ class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -6307,9 +6487,11 @@ class UpdateParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsFpx(TypedDict): @@ -6319,9 +6501,11 @@ class UpdateParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -6331,9 +6515,11 @@ class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -6343,9 +6529,11 @@ class UpdateParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -6357,9 +6545,11 @@ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -6433,9 +6623,11 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -6461,9 +6653,11 @@ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsLink(TypedDict): @@ -6487,9 +6681,11 @@ class UpdateParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -6507,9 +6703,11 @@ class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -6519,9 +6717,11 @@ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -6535,9 +6735,11 @@ class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsP24(TypedDict): @@ -6547,9 +6749,11 @@ class UpdateParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -6563,9 +6767,11 @@ class UpdateParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -6617,9 +6823,11 @@ class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPix(TypedDict): @@ -6637,9 +6845,11 @@ class UpdateParamsPaymentMethodOptionsPix(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -6649,9 +6859,11 @@ class UpdateParamsPaymentMethodOptionsPromptpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -6671,6 +6883,8 @@ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -6689,9 +6903,11 @@ class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -6712,9 +6928,11 @@ class UpdateParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsSwish(TypedDict): @@ -6728,9 +6946,11 @@ class UpdateParamsPaymentMethodOptionsSwish(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsTwint(TypedDict): @@ -6740,9 +6960,11 @@ class UpdateParamsPaymentMethodOptionsTwint(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -6778,9 +7000,11 @@ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -6858,9 +7082,11 @@ class UpdateParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsZip(TypedDict): @@ -6870,9 +7096,11 @@ class UpdateParamsPaymentMethodOptionsZip(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsShipping(TypedDict): diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 67d21c1cc..153f6d797 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -460,6 +460,7 @@ class SetupError(StripeObject): "charge_already_refunded", "charge_disputed", "charge_exceeds_source_limit", + "charge_exceeds_transaction_limit", "charge_expired_for_capture", "charge_invalid_parameter", "charge_not_refundable", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index eb1ef447d..2fe740b1c 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -113,6 +113,7 @@ class LastSetupError(StripeObject): "charge_already_refunded", "charge_disputed", "charge_exceeds_source_limit", + "charge_exceeds_transaction_limit", "charge_expired_for_capture", "charge_invalid_parameter", "charge_not_refundable", @@ -2904,7 +2905,7 @@ class ModifyParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + 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. """ payment_method_configuration: NotRequired[str] """ @@ -4000,7 +4001,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ payment_method: Optional[ExpandableField["PaymentMethod"]] """ - ID of the payment method used with this SetupIntent. + ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.corp.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. """ payment_method_configuration_details: Optional[ PaymentMethodConfigurationDetails diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index f08d7e158..17a3e170a 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -2370,7 +2370,7 @@ class UpdateParams(TypedDict): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + 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. """ payment_method_configuration: NotRequired[str] """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 5f2478489..dd621444f 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -595,7 +595,7 @@ class CreateParams(RequestOptions): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ on_behalf_of: NotRequired["Literal['']|str"] """ @@ -1408,7 +1408,7 @@ class ModifyParams(RequestOptions): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ on_behalf_of: NotRequired["Literal['']|str"] """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 4614d3a90..b6264fe12 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -277,7 +277,7 @@ class ModifyParams(RequestOptions): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ payment_behavior: NotRequired[ Literal[ diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index e8f520ec7..ae5d8232e 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -227,7 +227,7 @@ class UpdateParams(TypedDict): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ payment_behavior: NotRequired[ Literal[ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 77483b8d7..c14e40f3a 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -153,7 +153,7 @@ class CreateParams(TypedDict): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ on_behalf_of: NotRequired["Literal['']|str"] """ @@ -1024,7 +1024,7 @@ class UpdateParams(TypedDict): """ off_session: NotRequired[bool] """ - Indicates if a customer is on or off-session while an invoice payment is attempted. + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). """ on_behalf_of: NotRequired["Literal['']|str"] """ diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index 7a9666047..9fc7bcb79 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -160,6 +160,7 @@ class CreateParams(RequestOptions): "application_fee.refund.updated", "application_fee.refunded", "balance.available", + "billing.alert.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -448,6 +449,7 @@ class ModifyParams(RequestOptions): "application_fee.refund.updated", "application_fee.refunded", "balance.available", + "billing.alert.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index dbaaeff57..0fc6698fc 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -141,6 +141,7 @@ class CreateParams(TypedDict): "application_fee.refund.updated", "application_fee.refunded", "balance.available", + "billing.alert.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -435,6 +436,7 @@ class UpdateParams(TypedDict): "application_fee.refund.updated", "application_fee.refunded", "balance.available", + "billing.alert.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", diff --git a/stripe/api_resources/billing/__init__.py b/stripe/api_resources/billing/__init__.py index 8ce8db1e8..e469ff8d7 100644 --- a/stripe/api_resources/billing/__init__.py +++ b/stripe/api_resources/billing/__init__.py @@ -16,6 +16,8 @@ stacklevel=2, ) if not TYPE_CHECKING: + from stripe.api_resources.billing.alert import Alert + from stripe.api_resources.billing.alert_triggered import AlertTriggered from stripe.api_resources.billing.meter import Meter from stripe.api_resources.billing.meter_event import MeterEvent from stripe.api_resources.billing.meter_event_adjustment import ( diff --git a/stripe/api_resources/billing/alert.py b/stripe/api_resources/billing/alert.py new file mode 100644 index 000000000..09ccecff9 --- /dev/null +++ b/stripe/api_resources/billing/alert.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.alert package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.alert import Alert + To: + from stripe.billing import Alert + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._alert import ( # noqa + Alert, + ) diff --git a/stripe/api_resources/billing/alert_triggered.py b/stripe/api_resources/billing/alert_triggered.py new file mode 100644 index 000000000..c967783e7 --- /dev/null +++ b/stripe/api_resources/billing/alert_triggered.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.alert_triggered package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.alert_triggered import AlertTriggered + To: + from stripe.billing import AlertTriggered + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._alert_triggered import ( # noqa + AlertTriggered, + ) diff --git a/stripe/billing/__init__.py b/stripe/billing/__init__.py index 45172d78a..728f48113 100644 --- a/stripe/billing/__init__.py +++ b/stripe/billing/__init__.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.billing._alert import Alert as Alert +from stripe.billing._alert_triggered import AlertTriggered as AlertTriggered from stripe.billing._meter import Meter as Meter from stripe.billing._meter_event import MeterEvent as MeterEvent from stripe.billing._meter_event_adjustment import ( diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py new file mode 100644 index 000000000..1119101b5 --- /dev/null +++ b/stripe/billing/_alert.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._expandable_field import ExpandableField +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._customer import Customer + from stripe.billing._meter import Meter + + +class Alert(StripeObject): + """ + A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + """ + + OBJECT_NAME: ClassVar[Literal["billing.alert"]] = "billing.alert" + + class Filter(StripeObject): + customer: Optional[ExpandableField["Customer"]] + """ + Limit the scope of the alert to this customer ID + """ + + class UsageThresholdConfig(StripeObject): + gte: int + """ + The value at which this alert will trigger. + """ + meter: ExpandableField["Meter"] + """ + The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored. + """ + recurrence: Literal["one_time"] + """ + Defines how the alert will behave. + """ + + alert_type: Literal["usage_threshold"] + """ + Defines the type of the alert. + """ + filter: Optional[Filter] + """ + Limits the scope of the alert to a specific [customer](https://stripe.com/docs/api/customers). + """ + id: str + """ + Unique identifier for the object. + """ + 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["billing.alert"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + status: Optional[Literal["active", "archived", "inactive"]] + """ + Status of the alert. This can be active, inactive or archived. + """ + title: str + """ + Title of the alert. + """ + usage_threshold_config: Optional[UsageThresholdConfig] + """ + Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + """ + _inner_class_types = { + "filter": Filter, + "usage_threshold_config": UsageThresholdConfig, + } diff --git a/stripe/billing/_alert_triggered.py b/stripe/billing/_alert_triggered.py new file mode 100644 index 000000000..3e33e9406 --- /dev/null +++ b/stripe/billing/_alert_triggered.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.billing._alert import Alert + + +class AlertTriggered(StripeObject): + OBJECT_NAME: ClassVar[Literal["billing.alert_triggered"]] = ( + "billing.alert_triggered" + ) + alert: "Alert" + """ + A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + customer: str + """ + ID of customer for which the alert triggered + """ + 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["billing.alert_triggered"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + value: int + """ + The value triggering the alert + """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index abe5cbb98..56152c957 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -566,6 +566,8 @@ class MandateOptions(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: Optional[ @@ -583,6 +585,8 @@ class Affirm(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -593,6 +597,8 @@ class AfterpayClearpay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -603,6 +609,8 @@ class Alipay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -613,6 +621,8 @@ class AmazonPay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -623,6 +633,8 @@ class AuBecsDebit(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -635,6 +647,8 @@ class BacsDebit(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -645,6 +659,8 @@ class Bancontact(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -661,6 +677,8 @@ class Boleto(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -684,6 +702,8 @@ class Installments(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ statement_descriptor_suffix_kana: Optional[str] @@ -703,6 +723,8 @@ class Cashapp(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -758,6 +780,8 @@ class EuBankTransfer(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ _inner_class_types = {"bank_transfer": BankTransfer} @@ -769,6 +793,8 @@ class Eps(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -779,6 +805,8 @@ class Fpx(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -789,6 +817,8 @@ class Giropay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -799,6 +829,8 @@ class Grabpay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -809,6 +841,8 @@ class Ideal(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -821,6 +855,8 @@ class Klarna(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -835,6 +871,8 @@ class Konbini(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -845,6 +883,8 @@ class Link(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -855,6 +895,8 @@ class Mobilepay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -865,6 +907,8 @@ class Multibanco(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -879,6 +923,8 @@ class Oxxo(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -889,6 +935,8 @@ class P24(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -899,6 +947,8 @@ class Paynow(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -921,6 +971,8 @@ class Paypal(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -937,6 +989,8 @@ class RevolutPay(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -949,6 +1003,8 @@ class SepaDebit(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -959,6 +1015,8 @@ class Sofort(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1013,6 +1071,8 @@ class Filters(StripeObject): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: Optional[Literal["automatic", "instant"]] @@ -2621,6 +2681,8 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: NotRequired[ @@ -2663,6 +2725,8 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2673,6 +2737,8 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2683,6 +2749,8 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2693,6 +2761,8 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2703,6 +2773,8 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2715,6 +2787,8 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2725,6 +2799,8 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2741,6 +2817,8 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2763,6 +2841,8 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ statement_descriptor_suffix_kana: NotRequired[str] @@ -2790,6 +2870,8 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2810,6 +2892,8 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2866,6 +2950,8 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2876,6 +2962,8 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2886,6 +2974,8 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2896,6 +2986,8 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2906,6 +2998,8 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2916,6 +3010,8 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2930,6 +3026,8 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2940,6 +3038,8 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2950,6 +3050,8 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2960,6 +3062,8 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2974,6 +3078,8 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -2984,6 +3090,8 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ tos_shown_and_accepted: NotRequired[bool] @@ -2998,6 +3106,8 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3050,9 +3160,11 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -3068,6 +3180,8 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3080,6 +3194,8 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3090,6 +3206,8 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3114,6 +3232,8 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: NotRequired[Literal["automatic", "instant"]] @@ -3156,6 +3276,8 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -3833,7 +3955,7 @@ class RetrieveParams(RequestOptions): """ currency_conversion: Optional[CurrencyConversion] """ - Currency conversion details for automatic currency conversion sessions + Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions """ custom_fields: List[CustomField] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index cff7f1756..fd6f7586b 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -1130,6 +1130,8 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: NotRequired[ @@ -1172,6 +1174,8 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1182,6 +1186,8 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1192,6 +1198,8 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1202,6 +1210,8 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1212,6 +1222,8 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1224,6 +1236,8 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1234,6 +1248,8 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1250,6 +1266,8 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1272,6 +1290,8 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ statement_descriptor_suffix_kana: NotRequired[str] @@ -1299,6 +1319,8 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1319,6 +1341,8 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1375,6 +1399,8 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1385,6 +1411,8 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1395,6 +1423,8 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1405,6 +1435,8 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1415,6 +1447,8 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1425,6 +1459,8 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1439,6 +1475,8 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1449,6 +1487,8 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1459,6 +1499,8 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1469,6 +1511,8 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1483,6 +1527,8 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1493,6 +1539,8 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ tos_shown_and_accepted: NotRequired[bool] @@ -1507,6 +1555,8 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1559,9 +1609,11 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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`. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -1577,6 +1629,8 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1589,6 +1643,8 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1599,6 +1655,8 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ @@ -1623,6 +1681,8 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ verification_method: NotRequired[Literal["automatic", "instant"]] @@ -1665,6 +1725,8 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): 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. + If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + 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). """ diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 4cda93ad7..5760bc3b8 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -51,7 +51,7 @@ class Balance(StripeObject): class Cash(StripeObject): available: Optional[Dict[str, int]] """ - The funds available to the account holder. Typically this is the current balance less any holds. + The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -76,7 +76,7 @@ class Credit(StripeObject): credit: Optional[Credit] current: Dict[str, int] """ - The balances owed to (or by) the account holder. + The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. From 8598672eafa4917613eb15552f0216f5aedd9e9d Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Thu, 1 Aug 2024 17:24:22 -0400 Subject: [PATCH 02/36] Bump version to 10.6.0 --- CHANGELOG.md | 7 +++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5370b8d90..a310adb94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 10.6.0 - 2024-08-01 +* [#1369](https://github.com/stripe/stripe-python/pull/1369) Update generated code + * Add support for resource `stripe.billing.Alert` + * ⚠️ Remove support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card`. This was accidentally released last week. + * Add support for `billing.alert.triggered` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `charge_exceeds_transaction_limit` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + ## 10.5.0 - 2024-07-25 * [#1368](https://github.com/stripe/stripe-python/pull/1368) Update generated code * Add support for `tax_registrations` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents` diff --git a/VERSION b/VERSION index 2cf514e36..d1dd3f904 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.5.0 +10.6.0 diff --git a/stripe/_version.py b/stripe/_version.py index 0a8379cd6..8f89d8205 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.5.0" +VERSION = "10.6.0" From 7990f90efde051a793e087270b7654f6e4e789d9 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:52:51 -0700 Subject: [PATCH 03/36] Update generated code (#1371) * Update generated code for v1170 * Update generated code for v1171 * Update generated code for v1172 * Update generated code for v1173 * Update generated code for v1174 * Update generated code for v1175 * Update generated code for v1176 * Update generated code for v1177 * Update generated code for v1179 * Update generated code for v1180 * Update generated code for v1182 * Update generated code for v1183 * Update generated code for v1184 * Update generated code for v1186 * Update generated code for v1187 * Update generated code for v1188 * Update generated code for v1189 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 14 +- stripe/_account_service.py | 12 +- stripe/_billing_service.py | 2 + stripe/_card.py | 4 +- stripe/_charge.py | 20 +- stripe/_charge_service.py | 10 +- stripe/_confirmation_token.py | 20 +- stripe/_customer_session.py | 4 +- stripe/_customer_session_service.py | 2 +- stripe/_invoice.py | 27 +- stripe/_invoice_service.py | 22 +- stripe/_invoice_upcoming_lines_service.py | 4 +- stripe/_payment_intent.py | 1173 +++++++++-------- stripe/_payment_intent_service.py | 939 ++++++------- stripe/_payment_link.py | 12 +- stripe/_payment_link_service.py | 8 +- stripe/_payment_method.py | 20 +- stripe/_person.py | 5 +- stripe/_setup_attempt.py | 5 + stripe/_setup_intent.py | 5 + stripe/_setup_intent_service.py | 3 + stripe/_subscription.py | 13 +- stripe/_subscription_service.py | 10 +- stripe/_transfer.py | 2 +- stripe/_transfer_service.py | 2 +- stripe/billing/__init__.py | 1 + stripe/billing/_alert.py | 516 +++++++- stripe/billing/_alert_service.py | 353 +++++ stripe/checkout/_session.py | 375 +++--- stripe/checkout/_session_service.py | 195 ++- stripe/identity/_verification_session.py | 9 + .../identity/_verification_session_service.py | 5 + stripe/tax/_calculation.py | 28 + stripe/tax/_calculation_service.py | 53 + stripe/terminal/_reader.py | 2 +- stripe/treasury/_financial_account.py | 3 + 37 files changed, 2454 insertions(+), 1426 deletions(-) create mode 100644 stripe/billing/_alert_service.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 03029e1c8..1af8caa5d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1169 \ No newline at end of file +v1189 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 0936cf435..ad20ec69f 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -1038,19 +1038,19 @@ class Payments(StripeObject): """ statement_descriptor_kana: Optional[str] """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_kanji: Optional[str] """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_prefix_kana: Optional[str] """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_prefix_kanji: Optional[str] """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ class Payouts(StripeObject): @@ -2742,15 +2742,15 @@ class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): class CreateParamsSettingsPayments(TypedDict): statement_descriptor: NotRequired[str] """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). """ statement_descriptor_kana: NotRequired[str] """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_kanji: NotRequired[str] """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ class CreateParamsSettingsPayouts(TypedDict): diff --git a/stripe/_account_service.py b/stripe/_account_service.py index bc4171d37..2aa902006 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1561,15 +1561,15 @@ class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): class CreateParamsSettingsPayments(TypedDict): statement_descriptor: NotRequired[str] """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). """ statement_descriptor_kana: NotRequired[str] """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_kanji: NotRequired[str] """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ class CreateParamsSettingsPayouts(TypedDict): @@ -3219,15 +3219,15 @@ class UpdateParamsSettingsInvoices(TypedDict): class UpdateParamsSettingsPayments(TypedDict): statement_descriptor: NotRequired[str] """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). """ statement_descriptor_kana: NotRequired[str] """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ statement_descriptor_kanji: NotRequired[str] """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). """ class UpdateParamsSettingsPayouts(TypedDict): diff --git a/stripe/_billing_service.py b/stripe/_billing_service.py index 8d4f279e7..e30f30081 100644 --- a/stripe/_billing_service.py +++ b/stripe/_billing_service.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_service import StripeService +from stripe.billing._alert_service import AlertService from stripe.billing._meter_event_adjustment_service import ( MeterEventAdjustmentService, ) @@ -11,6 +12,7 @@ class BillingService(StripeService): def __init__(self, requestor): super().__init__(requestor) + self.alerts = AlertService(self._requestor) self.meters = MeterService(self._requestor) self.meter_events = MeterEventService(self._requestor) self.meter_event_adjustments = MeterEventAdjustmentService( diff --git a/stripe/_card.py b/stripe/_card.py index 434bad80a..631da0c36 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -78,7 +78,7 @@ class DeleteParams(RequestOptions): """ brand: str """ - Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. """ country: Optional[str] """ @@ -86,7 +86,7 @@ class DeleteParams(RequestOptions): """ currency: Optional[str] """ - Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ customer: Optional[ExpandableField["Customer"]] """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 1e8eb2fe2..7ab12a247 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -805,6 +805,10 @@ class Offline(StripeObject): """ Time at which the payment was collected while offline """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ class Receipt(StripeObject): account_type: Optional[ @@ -1788,11 +1792,11 @@ class CaptureParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CaptureParamsTransferData"] """ @@ -1866,11 +1870,11 @@ class CreateParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CreateParamsTransferData"] """ @@ -1986,7 +1990,7 @@ class ListParams(RequestOptions): """ transfer_group: NotRequired[str] """ - Only return charges for this transfer group. + Only return charges for this transfer group, limited to 100. """ class ListParamsCreated(TypedDict): @@ -2178,7 +2182,7 @@ class SearchParams(RequestOptions): billing_details: BillingDetails calculated_statement_descriptor: Optional[str] """ - The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This only works for card payments. + The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. """ captured: bool """ @@ -2309,11 +2313,11 @@ class SearchParams(RequestOptions): """ statement_descriptor: Optional[str] """ - For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: Optional[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ status: Literal["failed", "pending", "succeeded"] """ diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index eeb199f83..f21605715 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -34,11 +34,11 @@ class CaptureParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CaptureParamsTransferData"] """ @@ -112,11 +112,11 @@ class CreateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CreateParamsTransferData"] """ @@ -232,7 +232,7 @@ class ListParams(TypedDict): """ transfer_group: NotRequired[str] """ - Only return charges for this transfer group. + Only return charges for this transfer group, limited to 100. """ class ListParamsCreated(TypedDict): diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 0011236f3..2d9cec16d 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -218,6 +218,10 @@ class Offline(StripeObject): """ Time at which the payment was collected while offline """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ class Receipt(StripeObject): account_type: Optional[ @@ -696,6 +700,16 @@ class Networks(StripeObject): The preferred network for the card. """ + class Offline(StripeObject): + stored_at: Optional[int] + """ + Time at which the payment was collected while offline + """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -750,6 +764,10 @@ class Networks(StripeObject): """ Contains information about card networks that can be used to process the payment. """ + offline: Optional[Offline] + """ + Details about payment methods collected offline. + """ preferred_locales: Optional[List[str]] """ EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. @@ -766,7 +784,7 @@ class Networks(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks} + _inner_class_types = {"networks": Networks, "offline": Offline} class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index 99fbfdb46..1e7791109 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -48,7 +48,7 @@ class Features(StripeObject): """ payment_method_redisplay_limit: Optional[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `10`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. """ payment_method_remove: Literal["disabled", "enabled"] """ @@ -172,7 +172,7 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): """ payment_method_redisplay_limit: NotRequired[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `10`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. """ payment_method_remove: NotRequired[Literal["disabled", "enabled"]] """ diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py index 126782ae3..f2c01ec87 100644 --- a/stripe/_customer_session_service.py +++ b/stripe/_customer_session_service.py @@ -75,7 +75,7 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): """ payment_method_redisplay_limit: NotRequired[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `10`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. """ payment_method_remove: NotRequired[Literal["disabled", "enabled"]] """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 060db3786..29a1a9640 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -389,6 +389,7 @@ class LastFinalizationError(StripeObject): "invalid_cvc", "invalid_expiry_month", "invalid_expiry_year", + "invalid_mandate_reference_prefix_format", "invalid_number", "invalid_source_usage", "invalid_tax_location", @@ -1535,13 +1536,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( TypedDict, ): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -2655,7 +2656,7 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ @@ -3220,13 +3221,13 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments( class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( TypedDict, ): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -3692,7 +3693,7 @@ class UpcomingLinesParams(RequestOptions): """ subscription_cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. """ subscription_cancel_now: NotRequired[bool] """ @@ -4492,7 +4493,7 @@ class UpcomingLinesParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ @@ -4828,7 +4829,7 @@ class UpcomingParams(RequestOptions): """ subscription_cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. """ subscription_cancel_now: NotRequired[bool] """ @@ -5610,7 +5611,7 @@ class UpcomingParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index d11af31dd..6981cdccd 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -555,13 +555,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( TypedDict, ): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -1685,7 +1685,7 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ @@ -2099,7 +2099,7 @@ class UpcomingParams(TypedDict): """ subscription_cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. """ subscription_cancel_now: NotRequired[bool] """ @@ -2887,7 +2887,7 @@ class UpcomingParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ @@ -3661,13 +3661,13 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( class UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( TypedDict, ): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index a8b353801..23216c534 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -100,7 +100,7 @@ class ListParams(TypedDict): """ subscription_cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. """ subscription_cancel_now: NotRequired[bool] """ @@ -894,7 +894,7 @@ class ListParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index ab4123d8d..d6bed7af9 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -166,6 +166,7 @@ class LastPaymentError(StripeObject): "invalid_cvc", "invalid_expiry_month", "invalid_expiry_year", + "invalid_mandate_reference_prefix_format", "invalid_number", "invalid_source_usage", "invalid_tax_location", @@ -986,11 +987,11 @@ class MandateOptions(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: Optional[ Literal["automatic", "instant", "microdeposits"] @@ -1013,11 +1014,11 @@ class Affirm(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AfterpayClearpay(StripeObject): @@ -1034,11 +1035,11 @@ class AfterpayClearpay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Alipay(StripeObject): @@ -1046,11 +1047,11 @@ class Alipay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AmazonPay(StripeObject): @@ -1062,11 +1063,11 @@ class AmazonPay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AuBecsDebit(StripeObject): @@ -1076,11 +1077,11 @@ class AuBecsDebit(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class BacsDebit(StripeObject): @@ -1090,11 +1091,11 @@ class BacsDebit(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Bancontact(StripeObject): @@ -1106,11 +1107,11 @@ class Bancontact(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Blik(StripeObject): @@ -1118,11 +1119,11 @@ class Blik(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Boleto(StripeObject): @@ -1136,11 +1137,11 @@ class Boleto(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Card(StripeObject): @@ -1251,6 +1252,7 @@ class MandateOptions(StripeObject): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -1298,11 +1300,11 @@ class MandateOptions(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ statement_descriptor_suffix_kana: Optional[str] """ @@ -1348,11 +1350,11 @@ class Cashapp(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CustomerBalance(StripeObject): @@ -1405,11 +1407,11 @@ class EuBankTransfer(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ _inner_class_types = {"bank_transfer": BankTransfer} @@ -1418,11 +1420,11 @@ class Eps(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Fpx(StripeObject): @@ -1430,11 +1432,11 @@ class Fpx(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Giropay(StripeObject): @@ -1442,11 +1444,11 @@ class Giropay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Grabpay(StripeObject): @@ -1454,11 +1456,11 @@ class Grabpay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Ideal(StripeObject): @@ -1466,11 +1468,11 @@ class Ideal(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class InteracPresent(StripeObject): @@ -1489,11 +1491,11 @@ class Klarna(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Konbini(StripeObject): @@ -1517,11 +1519,11 @@ class Konbini(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Link(StripeObject): @@ -1537,11 +1539,11 @@ class Link(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Mobilepay(StripeObject): @@ -1553,11 +1555,11 @@ class Mobilepay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Multibanco(StripeObject): @@ -1565,11 +1567,11 @@ class Multibanco(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Oxxo(StripeObject): @@ -1581,11 +1583,11 @@ class Oxxo(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class P24(StripeObject): @@ -1593,11 +1595,11 @@ class P24(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Paynow(StripeObject): @@ -1605,11 +1607,11 @@ class Paynow(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Paypal(StripeObject): @@ -1629,11 +1631,11 @@ class Paypal(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Pix(StripeObject): @@ -1649,11 +1651,11 @@ class Pix(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Promptpay(StripeObject): @@ -1661,11 +1663,11 @@ class Promptpay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class RevolutPay(StripeObject): @@ -1677,11 +1679,11 @@ class RevolutPay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class SepaDebit(StripeObject): @@ -1695,11 +1697,11 @@ class MandateOptions(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ _inner_class_types = {"mandate_options": MandateOptions} @@ -1714,11 +1716,11 @@ class Sofort(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Swish(StripeObject): @@ -1730,11 +1732,11 @@ class Swish(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Twint(StripeObject): @@ -1742,11 +1744,11 @@ class Twint(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class UsBankAccount(StripeObject): @@ -1805,11 +1807,11 @@ class MandateOptions(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: Optional[ Literal["automatic", "instant", "microdeposits"] @@ -1835,11 +1837,11 @@ class WechatPay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Zip(StripeObject): @@ -1847,11 +1849,11 @@ class Zip(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ acss_debit: Optional[AcssDebit] @@ -2074,11 +2076,11 @@ class CaptureParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must be 1-22 characters long. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CaptureParamsTransferData"] """ @@ -2166,13 +2168,13 @@ class ConfirmParams(RequestOptions): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsShipping" @@ -3095,13 +3097,13 @@ class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -3149,13 +3151,13 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -3176,13 +3178,13 @@ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): @@ -3192,13 +3194,13 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -3216,11 +3218,11 @@ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -3230,13 +3232,13 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -3246,13 +3248,13 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): @@ -3266,13 +3268,13 @@ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): @@ -3284,13 +3286,13 @@ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): @@ -3304,13 +3306,13 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): @@ -3353,6 +3355,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -3400,13 +3403,13 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -3440,13 +3443,13 @@ class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -3609,13 +3612,13 @@ class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -3633,13 +3636,13 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -3693,13 +3696,13 @@ class ConfirmParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): @@ -3707,13 +3710,13 @@ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): @@ -3721,13 +3724,13 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -3735,13 +3738,13 @@ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): @@ -3751,13 +3754,13 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -3829,13 +3832,13 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): @@ -3859,13 +3862,13 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): @@ -3887,13 +3890,13 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -3909,13 +3912,13 @@ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -3923,13 +3926,13 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): @@ -3941,13 +3944,13 @@ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): @@ -3955,13 +3958,13 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -3973,13 +3976,13 @@ class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): @@ -4029,13 +4032,13 @@ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): @@ -4051,13 +4054,13 @@ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -4065,13 +4068,13 @@ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -4089,11 +4092,11 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -4109,13 +4112,13 @@ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -4134,13 +4137,13 @@ class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): @@ -4152,13 +4155,13 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): @@ -4166,13 +4169,13 @@ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -4206,13 +4209,13 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -4288,13 +4291,13 @@ class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): @@ -4302,13 +4305,13 @@ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsRadarOptions(TypedDict): @@ -4490,11 +4493,11 @@ class CreateParams(RequestOptions): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ shipping: NotRequired["PaymentIntent.CreateParamsShipping"] """ @@ -4502,11 +4505,11 @@ class CreateParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must contain 1-22 characters. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CreateParamsTransferData"] """ @@ -5444,13 +5447,13 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -5498,13 +5501,13 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -5525,13 +5528,13 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -5541,13 +5544,13 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -5565,11 +5568,11 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -5579,13 +5582,13 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -5595,13 +5598,13 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -5615,13 +5618,13 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBlik(TypedDict): @@ -5633,13 +5636,13 @@ class CreateParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -5653,13 +5656,13 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -5702,6 +5705,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -5749,13 +5753,13 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -5789,13 +5793,13 @@ class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -5958,13 +5962,13 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -5982,13 +5986,13 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -6042,13 +6046,13 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -6056,13 +6060,13 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -6070,13 +6074,13 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -6084,13 +6088,13 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -6100,13 +6104,13 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -6178,13 +6182,13 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -6208,13 +6212,13 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -6236,13 +6240,13 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -6258,13 +6262,13 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -6272,13 +6276,13 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -6290,13 +6294,13 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -6304,13 +6308,13 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -6322,13 +6326,13 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -6378,13 +6382,13 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -6400,13 +6404,13 @@ class CreateParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -6414,13 +6418,13 @@ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -6438,11 +6442,11 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -6458,13 +6462,13 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -6483,13 +6487,13 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -6501,13 +6505,13 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsTwint(TypedDict): @@ -6515,13 +6519,13 @@ class CreateParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -6555,13 +6559,13 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -6637,13 +6641,13 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsZip(TypedDict): @@ -6651,13 +6655,13 @@ class CreateParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsRadarOptions(TypedDict): @@ -6756,7 +6760,7 @@ class IncrementAuthorizationParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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[ "PaymentIntent.IncrementAuthorizationParamsTransferData" @@ -6891,13 +6895,13 @@ class ModifyParams(RequestOptions): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired["Literal['']|PaymentIntent.ModifyParamsShipping"] """ @@ -6905,11 +6909,11 @@ class ModifyParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.ModifyParamsTransferData"] """ @@ -7787,13 +7791,13 @@ class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -7841,13 +7845,13 @@ class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -7868,13 +7872,13 @@ class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): @@ -7884,13 +7888,13 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -7908,11 +7912,11 @@ class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -7922,13 +7926,13 @@ class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -7938,13 +7942,13 @@ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): @@ -7958,13 +7962,13 @@ class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBlik(TypedDict): @@ -7976,13 +7980,13 @@ class ModifyParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): @@ -7996,13 +8000,13 @@ class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCard(TypedDict): @@ -8045,6 +8049,7 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -8092,13 +8097,13 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -8132,13 +8137,13 @@ class ModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class ModifyParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -8301,13 +8306,13 @@ class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -8325,13 +8330,13 @@ class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -8385,13 +8390,13 @@ class ModifyParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsFpx(TypedDict): @@ -8399,13 +8404,13 @@ class ModifyParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): @@ -8413,13 +8418,13 @@ class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -8427,13 +8432,13 @@ class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): @@ -8443,13 +8448,13 @@ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -8521,13 +8526,13 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): @@ -8551,13 +8556,13 @@ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsLink(TypedDict): @@ -8579,13 +8584,13 @@ class ModifyParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -8601,13 +8606,13 @@ class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -8615,13 +8620,13 @@ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): @@ -8633,13 +8638,13 @@ class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsP24(TypedDict): @@ -8647,13 +8652,13 @@ class ModifyParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -8665,13 +8670,13 @@ class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): @@ -8721,13 +8726,13 @@ class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPix(TypedDict): @@ -8743,13 +8748,13 @@ class ModifyParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -8757,13 +8762,13 @@ class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -8781,11 +8786,11 @@ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -8801,13 +8806,13 @@ class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -8826,13 +8831,13 @@ class ModifyParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsSwish(TypedDict): @@ -8844,13 +8849,13 @@ class ModifyParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsTwint(TypedDict): @@ -8858,13 +8863,13 @@ class ModifyParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -8898,13 +8903,13 @@ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -8980,13 +8985,13 @@ class ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsPaymentMethodOptionsZip(TypedDict): @@ -8994,13 +8999,13 @@ class ModifyParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ModifyParamsShipping(TypedDict): @@ -9248,11 +9253,11 @@ class VerifyMicrodepositsParams(RequestOptions): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ shipping: Optional[Shipping] """ @@ -9268,11 +9273,11 @@ class VerifyMicrodepositsParams(RequestOptions): """ statement_descriptor: Optional[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: Optional[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ status: Literal[ "canceled", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 01ab18d7d..89591eb10 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -68,11 +68,11 @@ class CaptureParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must be 1-22 characters long. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CaptureParamsTransferData" @@ -164,13 +164,13 @@ class ConfirmParams(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsShipping" @@ -1115,13 +1115,13 @@ class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -1169,13 +1169,13 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -1196,13 +1196,13 @@ class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): @@ -1212,13 +1212,13 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -1236,11 +1236,11 @@ class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -1250,13 +1250,13 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -1266,13 +1266,13 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): @@ -1286,13 +1286,13 @@ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): @@ -1304,13 +1304,13 @@ class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): @@ -1324,13 +1324,13 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): @@ -1373,6 +1373,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -1420,13 +1421,13 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -1460,13 +1461,13 @@ class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -1629,13 +1630,13 @@ class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -1653,13 +1654,13 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -1713,13 +1714,13 @@ class ConfirmParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): @@ -1727,13 +1728,13 @@ class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): @@ -1741,13 +1742,13 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -1755,13 +1756,13 @@ class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): @@ -1771,13 +1772,13 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -1849,13 +1850,13 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): @@ -1879,13 +1880,13 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): @@ -1907,13 +1908,13 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -1929,13 +1930,13 @@ class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -1943,13 +1944,13 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): @@ -1961,13 +1962,13 @@ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): @@ -1975,13 +1976,13 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -1993,13 +1994,13 @@ class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): @@ -2049,13 +2050,13 @@ class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): @@ -2071,13 +2072,13 @@ class ConfirmParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -2085,13 +2086,13 @@ class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -2109,11 +2110,11 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -2129,13 +2130,13 @@ class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -2154,13 +2155,13 @@ class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): @@ -2172,13 +2173,13 @@ class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): @@ -2186,13 +2187,13 @@ class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -2226,13 +2227,13 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -2308,13 +2309,13 @@ class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): @@ -2322,13 +2323,13 @@ class ConfirmParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class ConfirmParamsRadarOptions(TypedDict): @@ -2512,11 +2513,11 @@ class CreateParams(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ shipping: NotRequired["PaymentIntentService.CreateParamsShipping"] """ @@ -2524,11 +2525,11 @@ class CreateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must contain 1-22 characters. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CreateParamsTransferData" @@ -3490,13 +3491,13 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -3544,13 +3545,13 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -3571,13 +3572,13 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -3587,13 +3588,13 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -3611,11 +3612,11 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -3625,13 +3626,13 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -3641,13 +3642,13 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -3661,13 +3662,13 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBlik(TypedDict): @@ -3679,13 +3680,13 @@ class CreateParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -3699,13 +3700,13 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -3748,6 +3749,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -3795,13 +3797,13 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -3835,13 +3837,13 @@ class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -4004,13 +4006,13 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -4028,13 +4030,13 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -4088,13 +4090,13 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -4102,13 +4104,13 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -4116,13 +4118,13 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -4130,13 +4132,13 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -4146,13 +4148,13 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -4224,13 +4226,13 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -4254,13 +4256,13 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -4282,13 +4284,13 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -4304,13 +4306,13 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -4318,13 +4320,13 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -4336,13 +4338,13 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -4350,13 +4352,13 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -4368,13 +4370,13 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -4424,13 +4426,13 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -4446,13 +4448,13 @@ class CreateParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -4460,13 +4462,13 @@ class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -4484,11 +4486,11 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -4504,13 +4506,13 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -4529,13 +4531,13 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -4547,13 +4549,13 @@ class CreateParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsTwint(TypedDict): @@ -4561,13 +4563,13 @@ class CreateParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -4601,13 +4603,13 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -4683,13 +4685,13 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsZip(TypedDict): @@ -4697,13 +4699,13 @@ class CreateParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsRadarOptions(TypedDict): @@ -4802,7 +4804,7 @@ class IncrementAuthorizationParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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[ "PaymentIntentService.IncrementAuthorizationParamsTransferData" @@ -4965,13 +4967,13 @@ class UpdateParams(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ shipping: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsShipping" @@ -4981,11 +4983,11 @@ class UpdateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.UpdateParamsTransferData" @@ -5887,13 +5889,13 @@ class UpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -5941,13 +5943,13 @@ class UpdateParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -5968,13 +5970,13 @@ class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -5984,13 +5986,13 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -6008,11 +6010,11 @@ class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -6022,13 +6024,13 @@ class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -6038,13 +6040,13 @@ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -6058,13 +6060,13 @@ class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBlik(TypedDict): @@ -6076,13 +6078,13 @@ class UpdateParamsPaymentMethodOptionsBlik(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -6096,13 +6098,13 @@ class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCard(TypedDict): @@ -6145,6 +6147,7 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -6192,13 +6195,13 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] """ @@ -6232,13 +6235,13 @@ class UpdateParamsPaymentMethodOptionsCardInstallments(TypedDict): """ class UpdateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int + count: NotRequired[int] """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. """ - interval: Literal["month"] + interval: NotRequired[Literal["month"]] """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ type: Literal["fixed_count"] @@ -6401,13 +6404,13 @@ class UpdateParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -6425,13 +6428,13 @@ class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -6485,13 +6488,13 @@ class UpdateParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsFpx(TypedDict): @@ -6499,13 +6502,13 @@ class UpdateParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -6513,13 +6516,13 @@ class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -6527,13 +6530,13 @@ class UpdateParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -6543,13 +6546,13 @@ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): @@ -6621,13 +6624,13 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -6651,13 +6654,13 @@ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsLink(TypedDict): @@ -6679,13 +6682,13 @@ class UpdateParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -6701,13 +6704,13 @@ class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -6715,13 +6718,13 @@ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -6733,13 +6736,13 @@ class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsP24(TypedDict): @@ -6747,13 +6750,13 @@ class UpdateParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ tos_shown_and_accepted: NotRequired[bool] """ @@ -6765,13 +6768,13 @@ class UpdateParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -6821,13 +6824,13 @@ class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPix(TypedDict): @@ -6843,13 +6846,13 @@ class UpdateParamsPaymentMethodOptionsPix(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsPromptpay(TypedDict): @@ -6857,13 +6860,13 @@ class UpdateParamsPaymentMethodOptionsPromptpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): @@ -6881,11 +6884,11 @@ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -6901,13 +6904,13 @@ class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): @@ -6926,13 +6929,13 @@ class UpdateParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsSwish(TypedDict): @@ -6944,13 +6947,13 @@ class UpdateParamsPaymentMethodOptionsSwish(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsTwint(TypedDict): @@ -6958,13 +6961,13 @@ class UpdateParamsPaymentMethodOptionsTwint(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): @@ -6998,13 +7001,13 @@ class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -7080,13 +7083,13 @@ class UpdateParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsPaymentMethodOptionsZip(TypedDict): @@ -7094,13 +7097,13 @@ class UpdateParamsPaymentMethodOptionsZip(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class UpdateParamsShipping(TypedDict): diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 7cd67469d..5d384e435 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -322,11 +322,11 @@ class PaymentIntentData(StripeObject): """ statement_descriptor: Optional[str] """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. """ statement_descriptor_suffix: Optional[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. """ transfer_group: Optional[str] """ @@ -1194,11 +1194,11 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired[str] """ @@ -1994,11 +1994,11 @@ class ModifyParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired["Literal['']|str"] """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired["Literal['']|str"] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired["Literal['']|str"] """ diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 026046830..f6ee75608 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -548,11 +548,11 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired[str] """ @@ -1346,11 +1346,11 @@ class UpdateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired["Literal['']|str"] """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired["Literal['']|str"] """ - Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired["Literal['']|str"] """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index bdb34ba0f..8f8497b43 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -180,6 +180,10 @@ class Offline(StripeObject): """ Time at which the payment was collected while offline """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ class Receipt(StripeObject): account_type: Optional[ @@ -656,6 +660,16 @@ class Networks(StripeObject): The preferred network for the card. """ + class Offline(StripeObject): + stored_at: Optional[int] + """ + Time at which the payment was collected while offline + """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -710,6 +724,10 @@ class Networks(StripeObject): """ Contains information about card networks that can be used to process the payment. """ + offline: Optional[Offline] + """ + Details about payment methods collected offline. + """ preferred_locales: Optional[List[str]] """ EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. @@ -726,7 +744,7 @@ class Networks(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks} + _inner_class_types = {"networks": Networks, "offline": Offline} class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_person.py b/stripe/_person.py index 399a97f2f..33b573801 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -38,7 +38,10 @@ class Account(StripeObject): The user agent of the browser from which the legal guardian accepted the service agreement. """ - account: Account + account: Optional[Account] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ _inner_class_types = {"account": Account} class Address(StripeObject): diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 153f6d797..1745937ef 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -245,6 +245,10 @@ class Offline(StripeObject): """ Time at which the payment was collected while offline """ + type: Optional[Literal["deferred"]] + """ + The method used to process this payment method offline. Only deferred is allowed. + """ generated_card: Optional[ExpandableField["PaymentMethod"]] """ @@ -498,6 +502,7 @@ class SetupError(StripeObject): "invalid_cvc", "invalid_expiry_month", "invalid_expiry_year", + "invalid_mandate_reference_prefix_format", "invalid_number", "invalid_source_usage", "invalid_tax_location", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 2fe740b1c..86bc2c2fd 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -151,6 +151,7 @@ class LastSetupError(StripeObject): "invalid_cvc", "invalid_expiry_month", "invalid_expiry_year", + "invalid_mandate_reference_prefix_format", "invalid_number", "invalid_source_usage", "invalid_tax_location", @@ -514,6 +515,7 @@ class MandateOptions(StripeObject): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -1441,6 +1443,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -2559,6 +2562,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -3644,6 +3648,7 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 17a3e170a..f768a1e5e 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -864,6 +864,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -2014,6 +2015,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -3141,6 +3143,7 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", diff --git a/stripe/_subscription.py b/stripe/_subscription.py index dd621444f..a1e841553 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -220,6 +220,7 @@ class MandateOptions(StripeObject): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -529,7 +530,7 @@ class CreateParams(RequestOptions): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] @@ -636,7 +637,7 @@ class CreateParams(RequestOptions): """ promotion_code: NotRequired[str] """ - The ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] @@ -1019,6 +1020,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -1344,7 +1346,7 @@ class ModifyParams(RequestOptions): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancellation_details: NotRequired[ "Subscription.ModifyParamsCancellationDetails" @@ -1451,7 +1453,7 @@ class ModifyParams(RequestOptions): """ promotion_code: NotRequired[str] """ - The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. + The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] @@ -1848,6 +1850,7 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -2079,7 +2082,7 @@ class SearchParams(RequestOptions): """ cancel_at_period_end: bool """ - If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. """ canceled_at: Optional[int] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index c14e40f3a..527d44d93 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -87,7 +87,7 @@ class CreateParams(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] @@ -194,7 +194,7 @@ class CreateParams(TypedDict): """ promotion_code: NotRequired[str] """ - The ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] @@ -585,6 +585,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", @@ -960,7 +961,7 @@ class UpdateParams(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Boolean indicating whether this subscription should cancel at the end of the current period. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancellation_details: NotRequired[ "SubscriptionService.UpdateParamsCancellationDetails" @@ -1067,7 +1068,7 @@ class UpdateParams(TypedDict): """ promotion_code: NotRequired[str] """ - The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. + The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] @@ -1470,6 +1471,7 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "diners", "discover", "eftpos_au", + "girocard", "interac", "jcb", "mastercard", diff --git a/stripe/_transfer.py b/stripe/_transfer.py index d8b59f2f1..75512a1c9 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -52,7 +52,7 @@ class CreateParams(RequestOptions): """ currency: str """ - 3-letter [ISO code for currency](https://stripe.com/docs/payouts). + Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). """ description: NotRequired[str] """ diff --git a/stripe/_transfer_service.py b/stripe/_transfer_service.py index a78d77486..df63bcd02 100644 --- a/stripe/_transfer_service.py +++ b/stripe/_transfer_service.py @@ -22,7 +22,7 @@ class CreateParams(TypedDict): """ currency: str """ - 3-letter [ISO code for currency](https://stripe.com/docs/payouts). + Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). """ description: NotRequired[str] """ diff --git a/stripe/billing/__init__.py b/stripe/billing/__init__.py index 728f48113..a6aea1532 100644 --- a/stripe/billing/__init__.py +++ b/stripe/billing/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe.billing._alert import Alert as Alert +from stripe.billing._alert_service import AlertService as AlertService from stripe.billing._alert_triggered import AlertTriggered as AlertTriggered from stripe.billing._meter import Meter as Meter from stripe.billing._meter_event import MeterEvent as MeterEvent diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 1119101b5..d2a2ddbac 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -1,16 +1,27 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional -from typing_extensions import Literal, TYPE_CHECKING +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, List, Optional, cast, overload +from typing_extensions import ( + Literal, + NotRequired, + TypedDict, + Unpack, + TYPE_CHECKING, +) if TYPE_CHECKING: from stripe._customer import Customer from stripe.billing._meter import Meter -class Alert(StripeObject): +class Alert(CreateableAPIResource["Alert"], ListableAPIResource["Alert"]): """ A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. """ @@ -37,6 +48,100 @@ class UsageThresholdConfig(StripeObject): Defines how the alert will behave. """ + class ActivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ArchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class CreateParams(RequestOptions): + alert_type: Literal["usage_threshold"] + """ + The type of alert to create. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filter: NotRequired["Alert.CreateParamsFilter"] + """ + Filters to limit the scope of an alert. + """ + title: str + """ + The title of the alert. + """ + usage_threshold_config: NotRequired[ + "Alert.CreateParamsUsageThresholdConfig" + ] + """ + The configuration of the usage threshold. + """ + + class CreateParamsFilter(TypedDict): + customer: NotRequired[str] + """ + Limit the scope to this alert only to this customer. + """ + + class CreateParamsUsageThresholdConfig(TypedDict): + gte: int + """ + Defines at which value the alert will fire. + """ + meter: NotRequired[str] + """ + The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored. + """ + recurrence: Literal["one_time"] + """ + Whether the alert should only fire only once, or once per billing cycle. + """ + + class DeactivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(RequestOptions): + alert_type: NotRequired[Literal["usage_threshold"]] + """ + Filter results to only include this type of alert. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + meter: NotRequired[str] + """ + Filter results to only include alerts with the given meter. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + alert_type: Literal["usage_threshold"] """ Defines the type of the alert. @@ -69,6 +174,411 @@ class UsageThresholdConfig(StripeObject): """ Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). """ + + @classmethod + def _cls_activate( + cls, id: str, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + "Alert", + cls._static_request( + "post", + "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + def activate(id: str, **params: Unpack["Alert.ActivateParams"]) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + ... + + @overload + def activate(self, **params: Unpack["Alert.ActivateParams"]) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + ... + + @class_method_variant("_cls_activate") + def activate( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + "Alert", + self._request( + "post", + "/v1/billing/alerts/{id}/activate".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_activate_async( + cls, id: str, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + "Alert", + await cls._static_request_async( + "post", + "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + async def activate_async( + id: str, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + ... + + @overload + async def activate_async( + self, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + ... + + @class_method_variant("_cls_activate_async") + async def activate_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.ActivateParams"] + ) -> "Alert": + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + "Alert", + await self._request_async( + "post", + "/v1/billing/alerts/{id}/activate".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + def _cls_archive( + cls, id: str, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + "Alert", + cls._static_request( + "post", + "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + def archive(id: str, **params: Unpack["Alert.ArchiveParams"]) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + ... + + @overload + def archive(self, **params: Unpack["Alert.ArchiveParams"]) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + ... + + @class_method_variant("_cls_archive") + def archive( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + "Alert", + self._request( + "post", + "/v1/billing/alerts/{id}/archive".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_archive_async( + cls, id: str, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + "Alert", + await cls._static_request_async( + "post", + "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + async def archive_async( + id: str, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + ... + + @overload + async def archive_async( + self, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + ... + + @class_method_variant("_cls_archive_async") + async def archive_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.ArchiveParams"] + ) -> "Alert": + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + "Alert", + await self._request_async( + "post", + "/v1/billing/alerts/{id}/archive".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + def create(cls, **params: Unpack["Alert.CreateParams"]) -> "Alert": + """ + Creates a billing alert + """ + return cast( + "Alert", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["Alert.CreateParams"] + ) -> "Alert": + """ + Creates a billing alert + """ + return cast( + "Alert", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def _cls_deactivate( + cls, id: str, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + "Alert", + cls._static_request( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def deactivate( + id: str, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + ... + + @overload + def deactivate( + self, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + ... + + @class_method_variant("_cls_deactivate") + def deactivate( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + "Alert", + self._request( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_deactivate_async( + cls, id: str, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + "Alert", + await cls._static_request_async( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def deactivate_async( + id: str, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + ... + + @overload + async def deactivate_async( + self, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + ... + + @class_method_variant("_cls_deactivate_async") + async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Alert.DeactivateParams"] + ) -> "Alert": + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + "Alert", + await self._request_async( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + def list(cls, **params: Unpack["Alert.ListParams"]) -> ListObject["Alert"]: + """ + Lists billing active and inactive alerts + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["Alert.ListParams"] + ) -> ListObject["Alert"]: + """ + Lists billing active and inactive alerts + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["Alert.RetrieveParams"] + ) -> "Alert": + """ + Retrieves a billing alert given an ID + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["Alert.RetrieveParams"] + ) -> "Alert": + """ + Retrieves a billing alert given an ID + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + _inner_class_types = { "filter": Filter, "usage_threshold_config": UsageThresholdConfig, diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py new file mode 100644 index 000000000..b3952ac19 --- /dev/null +++ b/stripe/billing/_alert_service.py @@ -0,0 +1,353 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._list_object import ListObject +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.billing._alert import Alert +from typing import List, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class AlertService(StripeService): + class ActivateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ArchiveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class CreateParams(TypedDict): + alert_type: Literal["usage_threshold"] + """ + The type of alert to create. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filter: NotRequired["AlertService.CreateParamsFilter"] + """ + Filters to limit the scope of an alert. + """ + title: str + """ + The title of the alert. + """ + usage_threshold_config: NotRequired[ + "AlertService.CreateParamsUsageThresholdConfig" + ] + """ + The configuration of the usage threshold. + """ + + class CreateParamsFilter(TypedDict): + customer: NotRequired[str] + """ + Limit the scope to this alert only to this customer. + """ + + class CreateParamsUsageThresholdConfig(TypedDict): + gte: int + """ + Defines at which value the alert will fire. + """ + meter: NotRequired[str] + """ + The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored. + """ + recurrence: Literal["one_time"] + """ + Whether the alert should only fire only once, or once per billing cycle. + """ + + class DeactivateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(TypedDict): + alert_type: NotRequired[Literal["usage_threshold"]] + """ + Filter results to only include this type of alert. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + meter: NotRequired[str] + """ + Filter results to only include alerts with the given meter. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def list( + self, + params: "AlertService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[Alert]: + """ + Lists billing active and inactive alerts + """ + return cast( + ListObject[Alert], + self._request( + "get", + "/v1/billing/alerts", + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "AlertService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[Alert]: + """ + Lists billing active and inactive alerts + """ + return cast( + ListObject[Alert], + await self._request_async( + "get", + "/v1/billing/alerts", + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, params: "AlertService.CreateParams", options: RequestOptions = {} + ) -> Alert: + """ + Creates a billing alert + """ + return cast( + Alert, + self._request( + "post", + "/v1/billing/alerts", + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, params: "AlertService.CreateParams", options: RequestOptions = {} + ) -> Alert: + """ + Creates a billing alert + """ + return cast( + Alert, + await self._request_async( + "post", + "/v1/billing/alerts", + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "AlertService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Retrieves a billing alert given an ID + """ + return cast( + Alert, + self._request( + "get", + "/v1/billing/alerts/{id}".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "AlertService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Retrieves a billing alert given an ID + """ + return cast( + Alert, + await self._request_async( + "get", + "/v1/billing/alerts/{id}".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + def activate( + self, + id: str, + params: "AlertService.ActivateParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + Alert, + self._request( + "post", + "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def activate_async( + self, + id: str, + params: "AlertService.ActivateParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Reactivates this alert, allowing it to trigger again. + """ + return cast( + Alert, + await self._request_async( + "post", + "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + def archive( + self, + id: str, + params: "AlertService.ArchiveParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + Alert, + self._request( + "post", + "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def archive_async( + self, + id: str, + params: "AlertService.ArchiveParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Archives this alert, removing it from the list view and APIs. This is non-reversible. + """ + return cast( + Alert, + await self._request_async( + "post", + "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + def deactivate( + self, + id: str, + params: "AlertService.DeactivateParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + Alert, + self._request( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(id) + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def deactivate_async( + self, + id: str, + params: "AlertService.DeactivateParams" = {}, + options: RequestOptions = {}, + ) -> Alert: + """ + Deactivates this alert, preventing it from triggering. + """ + return cast( + Alert, + await self._request_async( + "post", + "/v1/billing/alerts/{id}/deactivate".format( + id=sanitize_id(id) + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 56152c957..f30e84f17 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -564,11 +564,11 @@ class MandateOptions(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: Optional[ Literal["automatic", "instant", "microdeposits"] @@ -583,11 +583,11 @@ class Affirm(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AfterpayClearpay(StripeObject): @@ -595,11 +595,11 @@ class AfterpayClearpay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Alipay(StripeObject): @@ -607,11 +607,11 @@ class Alipay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AmazonPay(StripeObject): @@ -619,11 +619,11 @@ class AmazonPay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class AuBecsDebit(StripeObject): @@ -631,11 +631,11 @@ class AuBecsDebit(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class BacsDebit(StripeObject): @@ -645,11 +645,11 @@ class BacsDebit(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Bancontact(StripeObject): @@ -657,11 +657,11 @@ class Bancontact(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Boleto(StripeObject): @@ -675,11 +675,11 @@ class Boleto(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Card(StripeObject): @@ -700,11 +700,11 @@ class Installments(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ statement_descriptor_suffix_kana: Optional[str] """ @@ -721,11 +721,11 @@ class Cashapp(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CustomerBalance(StripeObject): @@ -778,11 +778,11 @@ class EuBankTransfer(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ _inner_class_types = {"bank_transfer": BankTransfer} @@ -791,11 +791,11 @@ class Eps(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Fpx(StripeObject): @@ -803,11 +803,11 @@ class Fpx(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Giropay(StripeObject): @@ -815,11 +815,11 @@ class Giropay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Grabpay(StripeObject): @@ -827,11 +827,11 @@ class Grabpay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Ideal(StripeObject): @@ -839,11 +839,11 @@ class Ideal(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Klarna(StripeObject): @@ -853,11 +853,11 @@ class Klarna(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Konbini(StripeObject): @@ -869,11 +869,11 @@ class Konbini(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Link(StripeObject): @@ -881,11 +881,11 @@ class Link(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Mobilepay(StripeObject): @@ -893,11 +893,11 @@ class Mobilepay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Multibanco(StripeObject): @@ -905,11 +905,11 @@ class Multibanco(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Oxxo(StripeObject): @@ -921,11 +921,11 @@ class Oxxo(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class P24(StripeObject): @@ -933,11 +933,11 @@ class P24(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Paynow(StripeObject): @@ -945,11 +945,11 @@ class Paynow(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Paypal(StripeObject): @@ -969,11 +969,11 @@ class Paypal(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Pix(StripeObject): @@ -987,11 +987,11 @@ class RevolutPay(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class SepaDebit(StripeObject): @@ -1001,11 +1001,11 @@ class SepaDebit(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Sofort(StripeObject): @@ -1013,11 +1013,11 @@ class Sofort(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class Swish(StripeObject): @@ -1069,11 +1069,11 @@ class Filters(StripeObject): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: Optional[Literal["automatic", "instant"]] """ @@ -2412,14 +2412,11 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Extra information about the payment. This will appear on your - customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the - prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete - statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "Session.CreateParamsPaymentIntentDataTransferData" @@ -2679,11 +2676,11 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -2723,11 +2720,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -2735,11 +2732,11 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -2747,11 +2744,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -2759,11 +2756,11 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -2771,11 +2768,11 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -2785,11 +2782,11 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -2797,11 +2794,11 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -2815,11 +2812,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -2839,11 +2836,11 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ statement_descriptor_suffix_kana: NotRequired[str] """ @@ -2868,11 +2865,11 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -2890,11 +2887,11 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -2948,11 +2945,11 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -2960,11 +2957,11 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -2972,11 +2969,11 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -2984,11 +2981,11 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -2996,11 +2993,11 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): @@ -3008,11 +3005,11 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -3024,11 +3021,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -3036,11 +3033,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -3048,11 +3045,11 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -3060,11 +3057,11 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -3076,11 +3073,11 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -3088,11 +3085,11 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ tos_shown_and_accepted: NotRequired[bool] """ @@ -3104,11 +3101,11 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -3158,13 +3155,13 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -3178,11 +3175,11 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -3192,11 +3189,11 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSofort(TypedDict): @@ -3204,11 +3201,11 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -3230,11 +3227,11 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: NotRequired[Literal["automatic", "instant"]] """ @@ -3274,11 +3271,11 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPhoneNumberCollection(TypedDict): diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index fd6f7586b..ad754f660 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -829,14 +829,11 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Extra information about the payment. This will appear on your - customer's statement when this payment succeeds in creating a charge. + Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about the charge that customers see on their statements. Concatenated with the - prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete - statement descriptor. Maximum 22 characters for the concatenated descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "SessionService.CreateParamsPaymentIntentDataTransferData" @@ -1128,11 +1125,11 @@ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: NotRequired[ Literal["automatic", "instant", "microdeposits"] @@ -1172,11 +1169,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): @@ -1184,11 +1181,11 @@ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): @@ -1196,11 +1193,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): @@ -1208,11 +1205,11 @@ class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): @@ -1220,11 +1217,11 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): @@ -1234,11 +1231,11 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): @@ -1246,11 +1243,11 @@ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): @@ -1264,11 +1261,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCard(TypedDict): @@ -1288,11 +1285,11 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ statement_descriptor_suffix_kana: NotRequired[str] """ @@ -1317,11 +1314,11 @@ class CreateParamsPaymentMethodOptionsCashapp(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): @@ -1339,11 +1336,11 @@ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( @@ -1397,11 +1394,11 @@ class CreateParamsPaymentMethodOptionsEps(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): @@ -1409,11 +1406,11 @@ class CreateParamsPaymentMethodOptionsFpx(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): @@ -1421,11 +1418,11 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): @@ -1433,11 +1430,11 @@ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): @@ -1445,11 +1442,11 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): @@ -1457,11 +1454,11 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): @@ -1473,11 +1470,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsLink(TypedDict): @@ -1485,11 +1482,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): @@ -1497,11 +1494,11 @@ class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): @@ -1509,11 +1506,11 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): @@ -1525,11 +1522,11 @@ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsP24(TypedDict): @@ -1537,11 +1534,11 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ tos_shown_and_accepted: NotRequired[bool] """ @@ -1553,11 +1550,11 @@ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): @@ -1607,13 +1604,13 @@ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). - If `setup_future_usage` is already set and you are performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ class CreateParamsPaymentMethodOptionsPix(TypedDict): @@ -1627,11 +1624,11 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): @@ -1641,11 +1638,11 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSofort(TypedDict): @@ -1653,11 +1650,11 @@ class CreateParamsPaymentMethodOptionsSofort(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPaymentMethodOptionsSwish(TypedDict): @@ -1679,11 +1676,11 @@ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ verification_method: NotRequired[Literal["automatic", "instant"]] """ @@ -1723,11 +1720,11 @@ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ 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. + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - 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). + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ class CreateParamsPhoneNumberCollection(TypedDict): diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 277141df8..506924ed9 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -243,6 +243,10 @@ class CreateParams(RequestOptions): """ Details provided about the user being verified. These details may be shown to the user. """ + related_customer: NotRequired[str] + """ + Token referencing a Customer resource. + """ return_url: NotRequired[str] """ The URL that the user will be redirected to upon completing the verification flow. @@ -315,6 +319,7 @@ class ListParams(RequestOptions): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ + related_customer: NotRequired[str] starting_after: NotRequired[str] """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @@ -466,6 +471,10 @@ class RetrieveParams(RequestOptions): """ Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. """ + related_customer: Optional[str] + """ + Token referencing a Customer resource. + """ status: Literal["canceled", "processing", "requires_input", "verified"] """ Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index f615b461e..7cbe57bd0 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -39,6 +39,10 @@ class CreateParams(TypedDict): """ Details provided about the user being verified. These details may be shown to the user. """ + related_customer: NotRequired[str] + """ + Token referencing a Customer resource. + """ return_url: NotRequired[str] """ The URL that the user will be redirected to upon completing the verification flow. @@ -113,6 +117,7 @@ class ListParams(TypedDict): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ + related_customer: NotRequired[str] starting_after: NotRequired[str] """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index ade6b71e5..69157e32b 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -648,6 +648,12 @@ class ListLineItemsParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + amount_total: int """ Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -852,6 +858,28 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def retrieve( + cls, id: str, **params: Unpack["Calculation.RetrieveParams"] + ) -> "Calculation": + """ + Retrieves a Tax Calculation object, if the calculation hasn't expired. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["Calculation.RetrieveParams"] + ) -> "Calculation": + """ + Retrieves a Tax Calculation object, if the calculation hasn't expired. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + _inner_class_types = { "customer_details": CustomerDetails, "ship_from_details": ShipFromDetails, diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index aad073403..ced36501f 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -2,6 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService +from stripe._util import sanitize_id from stripe.tax._calculation import Calculation from stripe.tax._calculation_line_item_service import ( CalculationLineItemService, @@ -270,6 +271,58 @@ class CreateParamsShippingCost(TypedDict): The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. """ + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def retrieve( + self, + calculation: str, + params: "CalculationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Calculation: + """ + Retrieves a Tax Calculation object, if the calculation hasn't expired. + """ + return cast( + Calculation, + self._request( + "get", + "/v1/tax/calculations/{calculation}".format( + calculation=sanitize_id(calculation), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + calculation: str, + params: "CalculationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Calculation: + """ + Retrieves a Tax Calculation object, if the calculation hasn't expired. + """ + return cast( + Calculation, + await self._request_async( + "get", + "/v1/tax/calculations/{calculation}".format( + calculation=sanitize_id(calculation), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + def create( self, params: "CalculationService.CreateParams", diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index eaf24cf5a..867dd6fe4 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -572,7 +572,7 @@ class SetReaderDisplayParamsCartLineItem(TypedDict): """ status: Optional[Literal["offline", "online"]] """ - The networking status of the reader. + The networking status of the reader. We do not recommend using this field in flows that may block taking payments. """ deleted: Optional[Literal[True]] """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 52299c702..3afd750e4 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -664,6 +664,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): "card_issuing", "deposit_insurance", "financial_addresses.aba", + "financial_addresses.aba.forwarding", "inbound_transfers.ach", "intra_stripe_flows", "outbound_payments.ach", @@ -720,6 +721,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): "card_issuing", "deposit_insurance", "financial_addresses.aba", + "financial_addresses.aba.forwarding", "inbound_transfers.ach", "intra_stripe_flows", "outbound_payments.ach", @@ -743,6 +745,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): "card_issuing", "deposit_insurance", "financial_addresses.aba", + "financial_addresses.aba.forwarding", "inbound_transfers.ach", "intra_stripe_flows", "outbound_payments.ach", From b869940b0e3fe00fe643eaadc6b9bf91cc5bccd0 Mon Sep 17 00:00:00 2001 From: David Brownman Date: Thu, 8 Aug 2024 16:57:26 -0700 Subject: [PATCH 04/36] Bump version to 10.7.0 --- CHANGELOG.md | 21 +++++++++++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a310adb94..d055d730e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## 10.7.0 - 2024-08-08 +* [#1371](https://github.com/stripe/stripe-python/pull/1371) Update generated code + * Add support for `type` on resource classes `stripe.Charge.PaymentMethodDetails.CardPresent.Offline`, `stripe.ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, `stripe.PaymentMethod.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, and `stripe.SetupAttempt.PaymentMethodDetails.CardPresent.Offline` + * Add support for `offline` on resource classes `stripe.ConfirmationToken.PaymentMethodPreview.CardPresent` and `stripe.PaymentMethod.CardPresent` + * Add support for `_cls_activate` on resource `stripe.billing.Alert` + * Add support for `_cls_archive` on resource `stripe.billing.Alert` + * Add support for `_cls_deactivate` on resource `stripe.billing.Alert` + * Add support for `activate` on resource `stripe.billing.Alert` + * Add support for `archive` on resource `stripe.billing.Alert` + * Add support for `create` on resource `stripe.billing.Alert` + * Add support for `deactivate` on resource `stripe.billing.Alert` + * Add support for `list` on resource `stripe.billing.Alert` + * Add support for `retrieve` on resources `stripe.billing.Alert` and `stripe.tax.Calculation` + * Add support for `related_customer` on parameter classes `stripe.identity.VerificationSession.CreateParams` and `stripe.identity.VerificationSession.ListParams` and resource `stripe.identity.VerificationSession` + * Add support for `invalid_mandate_reference_prefix_format` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + * Add support for `girocard` on enums `stripe.PaymentIntent.PaymentMethodOptions.Card.network`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsCard.network`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsCard.network`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.PaymentMethodOptions.Card.network`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.CreateParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptionsCard.network`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.Card.network`, `stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard.network`, and `stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard.network` + * Add support for `financial_addresses.aba.forwarding` on enums `stripe.treasury.FinancialAccount.active_features`, `stripe.treasury.FinancialAccount.pending_features`, and `stripe.treasury.FinancialAccount.restricted_features` + * Change type of `count` on `stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallmentsPlan`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallmentsPlan` from `int` to `NotRequired[int]` + * Change type of `interval` on `stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallmentsPlan`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallmentsPlan` from `Literal['month']` to `NotRequired[Literal['month']]` + * Change type of `account` on `stripe.Person.AdditionalTosAcceptances` from `Account` to `Optional[Account]` + ## 10.6.0 - 2024-08-01 * [#1369](https://github.com/stripe/stripe-python/pull/1369) Update generated code * Add support for resource `stripe.billing.Alert` diff --git a/VERSION b/VERSION index d1dd3f904..1bcdaf5fe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.6.0 +10.7.0 diff --git a/stripe/_version.py b/stripe/_version.py index 8f89d8205..f052486b9 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.6.0" +VERSION = "10.7.0" From bfe1175fb77301192921c2dbf7e8aa2522309119 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:31:34 -0700 Subject: [PATCH 05/36] Update generated code (#1373) * Update generated code for v1190 * Update generated code for v1192 * Update generated code for v1194 * Update generated code for v1195 * Update generated code for v1196 * Update generated code for v1198 * Update generated code for v1199 * Update generated code for v1200 * Update generated code for v1201 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 24 +++---- stripe/_account_external_account_service.py | 2 +- stripe/_account_person_service.py | 4 +- stripe/_account_service.py | 8 +-- stripe/_charge.py | 37 +++++++---- stripe/_charge_service.py | 4 +- stripe/_confirmation_token.py | 33 ++++++++-- stripe/_payment_intent.py | 46 +++++++++++--- stripe/_payment_intent_service.py | 37 +++++++++-- stripe/_payment_method.py | 28 +++++++-- stripe/_quote.py | 16 ++--- stripe/_quote_service.py | 4 +- stripe/_setup_intent.py | 62 ++++++++++++++++++- stripe/_setup_intent_service.py | 51 +++++++++++++++ stripe/_token.py | 2 +- stripe/_token_service.py | 2 +- stripe/checkout/_session.py | 2 +- stripe/checkout/_session_service.py | 2 +- .../treasury/_outbound_payment_service.py | 4 ++ .../treasury/_outbound_transfer_service.py | 4 ++ stripe/treasury/_outbound_payment.py | 10 ++- stripe/treasury/_outbound_transfer.py | 10 ++- 23 files changed, 320 insertions(+), 74 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1af8caa5d..82e4a49f9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1189 \ No newline at end of file +v1201 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index ad20ec69f..f5246a701 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2270,7 +2270,7 @@ class CreateParamsDocuments(TypedDict): "Account.CreateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "Account.CreateParamsDocumentsCompanyLicense" @@ -2840,7 +2840,7 @@ class CreatePersonParams(RequestOptions): "Account.CreatePersonParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Account.CreatePersonParamsAddress"] """ @@ -3405,7 +3405,7 @@ class ModifyExternalAccountParamsDocuments(TypedDict): "Account.ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. """ class ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( @@ -3421,7 +3421,7 @@ class ModifyPersonParams(RequestOptions): "Account.ModifyPersonParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Account.ModifyPersonParamsAddress"] """ @@ -3980,7 +3980,7 @@ def _cls_delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4004,7 +4004,7 @@ def delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4017,7 +4017,7 @@ def delete(self, **params: Unpack["Account.DeleteParams"]) -> "Account": Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4032,7 +4032,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4051,7 +4051,7 @@ async def _cls_delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4075,7 +4075,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4090,7 +4090,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4105,7 +4105,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py index 06a2b7e77..a048e69d5 100644 --- a/stripe/_account_external_account_service.py +++ b/stripe/_account_external_account_service.py @@ -193,7 +193,7 @@ class UpdateParamsDocuments(TypedDict): "AccountExternalAccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. """ class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 363ea0130..0fe82b820 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -15,7 +15,7 @@ class CreateParams(TypedDict): "AccountPersonService.CreateParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["AccountPersonService.CreateParamsAddress"] """ @@ -444,7 +444,7 @@ class UpdateParams(TypedDict): "AccountPersonService.UpdateParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["AccountPersonService.UpdateParamsAddress"] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 2aa902006..11ccec68e 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1077,7 +1077,7 @@ class CreateParamsDocuments(TypedDict): "AccountService.CreateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "AccountService.CreateParamsDocumentsCompanyLicense" @@ -2725,7 +2725,7 @@ class UpdateParamsDocuments(TypedDict): "AccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "AccountService.UpdateParamsDocumentsCompanyLicense" @@ -3325,7 +3325,7 @@ def delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -3352,7 +3352,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 7ab12a247..a1dd7cf1c 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -703,6 +703,10 @@ class ShippingAddress(StripeObject): """ The authorized amount. """ + authorization_code: Optional[str] + """ + Authorization code on the charge. + """ brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -850,6 +854,14 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -926,10 +938,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -959,7 +968,12 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ - _inner_class_types = {"offline": Offline, "receipt": Receipt} + wallet: Optional[Wallet] + _inner_class_types = { + "offline": Offline, + "receipt": Receipt, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] @@ -1247,10 +1261,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ preferred_locales: Optional[List[str]] """ @@ -1796,7 +1807,7 @@ class CaptureParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CaptureParamsTransferData"] """ @@ -1874,7 +1885,7 @@ class CreateParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CreateParamsTransferData"] """ @@ -2309,7 +2320,7 @@ class SearchParams(RequestOptions): """ source_transfer: Optional[ExpandableField["Transfer"]] """ - The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. """ statement_descriptor: Optional[str] """ @@ -2317,7 +2328,7 @@ class SearchParams(RequestOptions): """ statement_descriptor_suffix: Optional[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ status: Literal["failed", "pending", "succeeded"] """ diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index f21605715..a079598a3 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -38,7 +38,7 @@ class CaptureParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CaptureParamsTransferData"] """ @@ -116,7 +116,7 @@ class CreateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CreateParamsTransferData"] """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 2d9cec16d..239f20322 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -265,6 +265,17 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", + "google_pay", + "samsung_pay", + "unknown", + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -341,10 +352,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -374,9 +382,11 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ + wallet: Optional[Wallet] _inner_class_types = { "offline": Offline, "receipt": Receipt, + "wallet": Wallet, } card_present: Optional[CardPresent] @@ -710,6 +720,14 @@ class Offline(StripeObject): The method used to process this payment method offline. Only deferred is allowed. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -784,7 +802,12 @@ class Offline(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks, "offline": Offline} + wallet: Optional[Wallet] + _inner_class_types = { + "networks": Networks, + "offline": Offline, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index d6bed7af9..7ddf264ba 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1085,6 +1085,10 @@ class AuBecsDebit(StripeObject): """ class BacsDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] ] @@ -1097,6 +1101,7 @@ class BacsDebit(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): preferred_language: Literal["de", "en", "fr", "nl"] @@ -2080,7 +2085,7 @@ class CaptureParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CaptureParamsTransferData"] """ @@ -3242,6 +3247,12 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -3257,6 +3268,9 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -4413,7 +4427,7 @@ class CreateParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4509,7 +4523,7 @@ class CreateParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CreateParamsTransferData"] """ @@ -5592,6 +5606,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -5607,6 +5627,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -6845,7 +6868,7 @@ class ModifyParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -6913,7 +6936,7 @@ class ModifyParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.ModifyParamsTransferData"] """ @@ -7936,6 +7959,12 @@ class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -7951,6 +7980,9 @@ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -9177,7 +9209,7 @@ class VerifyMicrodepositsParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: Optional[str] """ @@ -9277,7 +9309,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ statement_descriptor_suffix: Optional[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ status: Literal[ "canceled", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 89591eb10..7e005149d 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -72,7 +72,7 @@ class CaptureParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CaptureParamsTransferData" @@ -1260,6 +1260,12 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -1275,6 +1281,9 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -2431,7 +2440,7 @@ class CreateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -2529,7 +2538,7 @@ class CreateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CreateParamsTransferData" @@ -3636,6 +3645,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -3651,6 +3666,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -4917,7 +4935,7 @@ class UpdateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4987,7 +5005,7 @@ class UpdateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.UpdateParamsTransferData" @@ -6034,6 +6052,12 @@ class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -6049,6 +6073,9 @@ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 8f8497b43..992ccf063 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -225,6 +225,14 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -301,10 +309,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -334,9 +339,11 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ + wallet: Optional[Wallet] _inner_class_types = { "offline": Offline, "receipt": Receipt, + "wallet": Wallet, } card_present: Optional[CardPresent] @@ -670,6 +677,12 @@ class Offline(StripeObject): The method used to process this payment method offline. Only deferred is allowed. """ + class Wallet(StripeObject): + type: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -744,7 +757,12 @@ class Offline(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks, "offline": Offline} + wallet: Optional[Wallet] + _inner_class_types = { + "networks": Networks, + "offline": Offline, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_quote.py b/stripe/_quote.py index fc7dc4df7..89da6af2d 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -1791,7 +1791,7 @@ async def modify_async( @classmethod def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1807,14 +1807,14 @@ def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: @staticmethod def pdf(quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload def pdf(self, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @@ -1823,7 +1823,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1842,7 +1842,7 @@ async def _cls_pdf_async( cls, quote: str, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1860,14 +1860,14 @@ async def pdf_async( quote: str, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload async def pdf_async(self, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @@ -1876,7 +1876,7 @@ async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index d1e256ebf..8db87912b 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -910,7 +910,7 @@ def pdf( options: RequestOptions = {}, ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -931,7 +931,7 @@ async def pdf_async( options: RequestOptions = {}, ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 86bc2c2fd..b19a36352 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -461,6 +461,13 @@ class MandateOptions(StripeObject): class AmazonPay(StripeObject): pass + class BacsDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class Card(StripeObject): class MandateOptions(StripeObject): amount: int @@ -614,6 +621,7 @@ class MandateOptions(StripeObject): acss_debit: Optional[AcssDebit] amazon_pay: Optional[AmazonPay] + bacs_debit: Optional[BacsDebit] card: Optional[Card] card_present: Optional[CardPresent] link: Optional[Link] @@ -623,6 +631,7 @@ class MandateOptions(StripeObject): _inner_class_types = { "acss_debit": AcssDebit, "amazon_pay": AmazonPay, + "bacs_debit": BacsDebit, "card": Card, "card_present": CardPresent, "link": Link, @@ -1343,6 +1352,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1423,6 +1438,17 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -2462,6 +2488,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -2542,6 +2574,17 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -3548,6 +3591,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -3628,6 +3677,17 @@ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" @@ -4006,7 +4066,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ payment_method: Optional[ExpandableField["PaymentMethod"]] """ - ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.corp.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. """ payment_method_configuration_details: Optional[ PaymentMethodConfigurationDetails diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index f768a1e5e..fb4dda1ee 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -760,6 +760,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCard" ] @@ -844,6 +850,17 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -1911,6 +1928,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCard" ] @@ -1995,6 +2018,17 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -3039,6 +3073,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCard" ] @@ -3123,6 +3163,17 @@ class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCardMandateOptions" diff --git a/stripe/_token.py b/stripe/_token.py index 2d405fbdf..11558266a 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -703,7 +703,7 @@ class CreateParamsPerson(TypedDict): "Token.CreateParamsPersonAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Token.CreateParamsPersonAddress"] """ diff --git a/stripe/_token_service.py b/stripe/_token_service.py index fd82b1ab1..422b953dd 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -674,7 +674,7 @@ class CreateParamsPerson(TypedDict): "TokenService.CreateParamsPersonAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["TokenService.CreateParamsPersonAddress"] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index f30e84f17..644112811 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1639,7 +1639,7 @@ class CreateParams(RequestOptions): """ cancel_url: NotRequired[str] """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`. """ client_reference_id: NotRequired[str] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index ad754f660..59750df82 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -36,7 +36,7 @@ class CreateParams(TypedDict): """ cancel_url: NotRequired[str] """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`. """ client_reference_id: NotRequired[str] """ diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index 754c7cba2..8299fc12a 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -87,6 +87,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index 6bc5760bb..185038a5b 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -87,6 +87,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 36d468169..db206c833 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -190,7 +190,11 @@ class Ach(StripeObject): """ class UsDomesticWire(StripeObject): - imad: str + chips: Optional[str] + """ + CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + """ + imad: Optional[str] """ IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. """ @@ -525,6 +529,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 794a444e1..db574845d 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -168,7 +168,11 @@ class Ach(StripeObject): """ class UsDomesticWire(StripeObject): - imad: str + chips: Optional[str] + """ + CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + """ + imad: Optional[str] """ IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. """ @@ -355,6 +359,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. From 5ff3d4b5730737399db2eeaae47e0a5d7772db1d Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Thu, 15 Aug 2024 14:16:42 -0700 Subject: [PATCH 06/36] Bump version to 10.8.0 --- CHANGELOG.md | 9 +++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d055d730e..11ef47a0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 10.8.0 - 2024-08-15 +* [#1373](https://github.com/stripe/stripe-python/pull/1373) Update generated code + * Add support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card` + * Add support for `wallet` on resource classes `stripe.Charge.PaymentMethodDetails.CardPresent`, `stripe.ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetails.CardPresent`, `stripe.ConfirmationToken.PaymentMethodPreview.CardPresent`, `stripe.PaymentMethod.Card.GeneratedFrom.PaymentMethodDetails.CardPresent`, and `stripe.PaymentMethod.CardPresent` + * Add support for `mandate_options` on parameter classes `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebit`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebit`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebit` and resource class `stripe.PaymentIntent.PaymentMethodOptions.BacsDebit` + * Add support for `bacs_debit` on parameter classes `stripe.SetupIntent.ConfirmParamsPaymentMethodOptions`, `stripe.SetupIntent.CreateParamsPaymentMethodOptions`, and `stripe.SetupIntent.ModifyParamsPaymentMethodOptions` and resource class `stripe.SetupIntent.PaymentMethodOptions` + * Add support for `chips` on resource classes `stripe.treasury.OutboundPayment.TrackingDetails.UsDomesticWire` and `stripe.treasury.OutboundTransfer.TrackingDetails.UsDomesticWire` and parameter classes `stripe.treasury.OutboundPayment.UpdateParamsTrackingDetailsUsDomesticWire` and `stripe.treasury.OutboundTransfer.UpdateParamsTrackingDetailsUsDomesticWire` + * Change type of `imad` on `stripe.treasury.OutboundPayment.TrackingDetails.UsDomesticWire` and `stripe.treasury.OutboundTransfer.TrackingDetails.UsDomesticWire` from `str` to `Optional[str]` + ## 10.7.0 - 2024-08-08 * [#1371](https://github.com/stripe/stripe-python/pull/1371) Update generated code * Add support for `type` on resource classes `stripe.Charge.PaymentMethodDetails.CardPresent.Offline`, `stripe.ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, `stripe.PaymentMethod.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, and `stripe.SetupAttempt.PaymentMethodDetails.CardPresent.Offline` diff --git a/VERSION b/VERSION index 1bcdaf5fe..2a3262d8a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.7.0 +10.8.0 diff --git a/stripe/_version.py b/stripe/_version.py index f052486b9..aa24b7374 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.7.0" +VERSION = "10.8.0" From 86c9f2307a528f838cca0a449bf8697cfcdff063 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 26 Aug 2024 19:24:40 +0200 Subject: [PATCH 07/36] Chain exceptions when reraising them (#1366) This makes debugging easier, since the original exception's details and traceback aren't just flattened to a string --- stripe/_http_client.py | 24 ++++++++++++------------ stripe/_stripe_object.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stripe/_http_client.py b/stripe/_http_client.py index a936dd654..af7a16cff 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -713,7 +713,7 @@ def _request_internal( return content, status_code, result.headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: # Catch SSL error first as it belongs to ConnectionError, # but we don't want to retry if isinstance(e, self.requests.exceptions.SSLError): @@ -764,7 +764,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = False msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def close(self): if getattr(self._thread_local, "session", None) is not None: @@ -869,7 +869,7 @@ def _request_internal( return content, result.status_code, result.headers - def _handle_request_error(self, e, url) -> NoReturn: + def _handle_request_error(self, e: Exception, url: str) -> NoReturn: if isinstance(e, self.urlfetch.InvalidURLError): msg = ( "The Stripe library attempted to fetch an " @@ -892,7 +892,7 @@ def _handle_request_error(self, e, url) -> NoReturn: ) msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) + raise APIConnectionError(msg) from e def close(self): pass @@ -1046,7 +1046,7 @@ def _request_internal( return rcontent, rcode, headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: if e.args[0] in [ self.pycurl.E_COULDNT_CONNECT, self.pycurl.E_COULDNT_RESOLVE_HOST, @@ -1079,7 +1079,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = False msg = textwrap.fill(msg) + "\n\n(Network error: " + e.args[1] + ")" - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def _get_proxy(self, url) -> Optional[ParseResult]: if self._parsed_proxy: @@ -1194,13 +1194,13 @@ def _request_internal( lh = dict((k.lower(), v) for k, v in iter(dict(headers).items())) return rcontent, rcode, lh - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. " "If this problem persists, let us know at support@stripe.com." ) msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) + raise APIConnectionError(msg) from e def close(self): pass @@ -1307,7 +1307,7 @@ async def request_async( response_headers = response.headers return content, status_code, response_headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. If this " "problem persists, let us know at support@stripe.com." @@ -1316,7 +1316,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = True msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def request_stream( self, method: str, url: str, headers: Mapping[str, str], post_data=None @@ -1446,7 +1446,7 @@ async def request_async( return (await content.read()), status_code, response_headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. If this " "problem persists, let us know at support@stripe.com." @@ -1455,7 +1455,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = True msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def request_stream(self) -> Tuple[Iterable[bytes], int, Mapping[str, str]]: raise NotImplementedError( diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index d0b2230f0..1e7bff5d9 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -171,7 +171,7 @@ def __getattr__(self, k): k = self._field_remappings[k] return self[k] except KeyError as err: - raise AttributeError(*err.args) + raise AttributeError(*err.args) from err def __delattr__(self, k): if k[0] == "_" or k in self.__dict__: From cf7bb8b23eb0537fa86710f821a30dc2757f0869 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein <52928443+richardm-stripe@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:03:36 -0700 Subject: [PATCH 08/36] Update http client comment (#1381) --- stripe/_http_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stripe/_http_client.py b/stripe/_http_client.py index af7a16cff..459b40ae5 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -39,10 +39,12 @@ Never, ) -# - Requests is the preferred HTTP library -# - Google App Engine has urlfetch -# - Use Pycurl if it's there (at least it verifies SSL certs) -# - Fall back to urllib2 with a warning if needed + +# The precedence of HTTP libraries is +# - Urlfetch (this is provided by Google App Engine, so if it's present you probably want it) +# - Requests (popular library, the top priority for all environments outside Google App Engine, but not always present) +# - Pycurl (another library, not always present, not as preferred as Requests but at least it verifies SSL certs) +# - urllib2 with a warning (basically always present, fallback if needed) try: import urllib.request as urllibrequest import urllib.error as urlliberror From 45264108355919405ee72f8590f37d6c40f62246 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 28 Aug 2024 04:26:21 +0300 Subject: [PATCH 09/36] Do not share RequestorOptions between APIRequestor instances if not passed (#1365) --- stripe/_api_requestor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index cc75eb516..dd91278b5 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -72,9 +72,11 @@ class _APIRequestor(object): def __init__( self, - options: RequestorOptions = RequestorOptions(), + options: Optional[RequestorOptions] = None, client: Optional[HTTPClient] = None, ): + if options is None: + options = RequestorOptions() self._options = options self._client = client From 2326675cba34941acdd0881ac7c8026e90b374bc Mon Sep 17 00:00:00 2001 From: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:29:29 -0400 Subject: [PATCH 10/36] Changed V1File implementation to pass content_type in options (#1382) --- stripe/_api_mode.py | 2 +- stripe/_api_requestor.py | 5 ++++- stripe/_file.py | 8 ++++++-- stripe/_file_service.py | 6 ++++-- stripe/_request_options.py | 4 ++++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/stripe/_api_mode.py b/stripe/_api_mode.py index 37e5530bd..1503e56e0 100644 --- a/stripe/_api_mode.py +++ b/stripe/_api_mode.py @@ -1,4 +1,4 @@ from typing_extensions import Literal -ApiMode = Literal["V1", "V1FILES"] +ApiMode = Literal["V1"] diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index dd91278b5..62951eed8 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -509,7 +509,10 @@ def _args_for_request_with_retries( abs_url = urlunsplit((scheme, netloc, path, query, fragment)) post_data = None elif method == "post": - if api_mode == "V1FILES": + if ( + options is not None + and options.get("content_type") == "multipart/form-data" + ): generator = MultipartDataGenerator() generator.add_params(params or {}) post_data = generator.get_post_data() diff --git a/stripe/_file.py b/stripe/_file.py index 72e4c82e7..20cf02120 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -209,6 +209,8 @@ def create(cls, **params: Unpack["File.CreateParams"]) -> "File": All of Stripe's officially supported Client libraries support sending multipart/form-data. """ + params["content_type"] = "multipart/form-data" + return cast( "File", cls._static_request( @@ -216,7 +218,7 @@ def create(cls, **params: Unpack["File.CreateParams"]) -> "File": cls.class_url(), params=params, base_address="files", - api_mode="V1FILES", + api_mode="V1", ), ) @@ -229,6 +231,8 @@ async def create_async( All of Stripe's officially supported Client libraries support sending multipart/form-data. """ + params["content_type"] = "multipart/form-data" + return cast( "File", await cls._static_request_async( @@ -236,7 +240,7 @@ async def create_async( cls.class_url(), params=params, base_address="files", - api_mode="V1FILES", + api_mode="V1", ), ) diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 9d11bdfab..12162f285 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -169,12 +169,13 @@ def create( All of Stripe's officially supported Client libraries support sending multipart/form-data. """ + options["content_type"] = "multipart/form-data" return cast( File, self._request( "post", "/v1/files", - api_mode="V1FILES", + api_mode="V1", base_address="files", params=params, options=options, @@ -189,12 +190,13 @@ async def create_async( All of Stripe's officially supported Client libraries support sending multipart/form-data. """ + options["content_type"] = "multipart/form-data" return cast( File, await self._request_async( "post", "/v1/files", - api_mode="V1FILES", + api_mode="V1", base_address="files", params=params, options=options, diff --git a/stripe/_request_options.py b/stripe/_request_options.py index d188818f8..caa26fa50 100644 --- a/stripe/_request_options.py +++ b/stripe/_request_options.py @@ -9,6 +9,7 @@ class RequestOptions(TypedDict): stripe_account: NotRequired["str|None"] max_network_retries: NotRequired["int|None"] idempotency_key: NotRequired["str|None"] + content_type: NotRequired["str|None"] headers: NotRequired["Mapping[str, str]|None"] @@ -27,6 +28,7 @@ def merge_options( "stripe_version": requestor.stripe_version, "max_network_retries": requestor.max_network_retries, "idempotency_key": None, + "content_type": None, "headers": None, } @@ -40,6 +42,7 @@ def merge_options( if request.get("max_network_retries") is not None else requestor.max_network_retries, "idempotency_key": request.get("idempotency_key"), + "content_type": request.get("content_type"), "headers": request.get("headers"), } @@ -61,6 +64,7 @@ def extract_options_from_dict( "stripe_account", "max_network_retries", "idempotency_key", + "content_type", "headers", ]: if key in d_copy: From 25343ed46996de2144b4cc4a9a72f94f2ac5db95 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:41:44 -0700 Subject: [PATCH 11/36] No need for api_mode to be passed around from individual API methods (#1383) --- stripe/_account_capability_service.py | 6 - stripe/_account_external_account_service.py | 10 -- stripe/_account_link_service.py | 2 - stripe/_account_login_link_service.py | 2 - stripe/_account_person_service.py | 10 -- stripe/_account_service.py | 14 --- stripe/_account_session_service.py | 2 - stripe/_api_requestor.py | 8 +- stripe/_api_resource.py | 15 +-- stripe/_apple_pay_domain_service.py | 8 -- stripe/_application_fee_refund_service.py | 8 -- stripe/_application_fee_service.py | 4 - stripe/_balance_service.py | 2 - stripe/_balance_transaction_service.py | 4 - stripe/_charge_service.py | 12 -- stripe/_confirmation_token_service.py | 2 - stripe/_country_spec_service.py | 4 - stripe/_coupon_service.py | 10 -- stripe/_credit_note_line_item_service.py | 2 - stripe/_credit_note_preview_lines_service.py | 2 - stripe/_credit_note_service.py | 12 -- .../_customer_balance_transaction_service.py | 8 -- stripe/_customer_cash_balance_service.py | 4 - ...stomer_cash_balance_transaction_service.py | 4 - .../_customer_funding_instructions_service.py | 2 - stripe/_customer_payment_method_service.py | 4 - stripe/_customer_payment_source_service.py | 12 -- stripe/_customer_service.py | 14 --- stripe/_customer_session_service.py | 2 - stripe/_customer_tax_id_service.py | 8 -- stripe/_dispute_service.py | 8 -- stripe/_ephemeral_key.py | 1 - stripe/_ephemeral_key_service.py | 4 - stripe/_event_service.py | 4 - stripe/_exchange_rate_service.py | 4 - stripe/_file.py | 2 - stripe/_file_link_service.py | 8 -- stripe/_file_service.py | 6 - stripe/_invoice_item_service.py | 10 -- stripe/_invoice_line_item_service.py | 4 - stripe/_invoice_service.py | 32 ------ stripe/_invoice_upcoming_lines_service.py | 2 - stripe/_list_object.py | 4 - stripe/_mandate_service.py | 2 - stripe/_oauth.py | 2 - stripe/_oauth_service.py | 2 - stripe/_payment_intent_service.py | 22 ---- stripe/_payment_link_line_item_service.py | 2 - stripe/_payment_link_service.py | 8 -- .../_payment_method_configuration_service.py | 8 -- stripe/_payment_method_domain_service.py | 10 -- stripe/_payment_method_service.py | 12 -- stripe/_payout_service.py | 12 -- stripe/_plan_service.py | 10 -- stripe/_price_service.py | 10 -- stripe/_product_feature_service.py | 8 -- stripe/_product_service.py | 12 -- stripe/_promotion_code_service.py | 8 -- ...ote_computed_upfront_line_items_service.py | 2 - stripe/_quote_line_item_service.py | 2 - stripe/_quote_service.py | 16 --- stripe/_refund_service.py | 10 -- stripe/_review_service.py | 6 - stripe/_search_result_object.py | 2 - stripe/_setup_attempt_service.py | 2 - stripe/_setup_intent_service.py | 14 --- stripe/_shipping_rate_service.py | 8 -- stripe/_source_service.py | 10 -- stripe/_source_transaction_service.py | 2 - stripe/_stripe_object.py | 10 -- stripe/_stripe_service.py | 9 -- stripe/_subscription_item_service.py | 10 -- ..._subscription_item_usage_record_service.py | 2 - ...ption_item_usage_record_summary_service.py | 2 - stripe/_subscription_schedule_service.py | 12 -- stripe/_subscription_service.py | 16 --- stripe/_tax_code_service.py | 4 - stripe/_tax_id_service.py | 8 -- stripe/_tax_rate_service.py | 8 -- stripe/_token_service.py | 4 - stripe/_topup_service.py | 10 -- stripe/_transfer_reversal_service.py | 8 -- stripe/_transfer_service.py | 8 -- stripe/_usage_record.py | 1 - stripe/_webhook_endpoint_service.py | 10 -- stripe/apps/_secret_service.py | 8 -- stripe/billing/_alert_service.py | 12 -- .../_meter_event_adjustment_service.py | 2 - stripe/billing/_meter_event_service.py | 2 - .../billing/_meter_event_summary_service.py | 2 - stripe/billing/_meter_service.py | 12 -- .../billing_portal/_configuration_service.py | 8 -- stripe/billing_portal/_session_service.py | 2 - stripe/checkout/_session_line_item_service.py | 2 - stripe/checkout/_session_service.py | 10 -- stripe/climate/_order_service.py | 10 -- stripe/climate/_product_service.py | 4 - stripe/climate/_supplier_service.py | 4 - .../_active_entitlement_service.py | 4 - stripe/entitlements/_feature_service.py | 8 -- .../_account_owner_service.py | 2 - .../financial_connections/_account_service.py | 12 -- .../financial_connections/_session_service.py | 4 - .../_transaction_service.py | 4 - stripe/forwarding/_request_service.py | 6 - .../identity/_verification_report_service.py | 4 - .../identity/_verification_session_service.py | 12 -- stripe/issuing/_authorization_service.py | 10 -- stripe/issuing/_card_service.py | 8 -- stripe/issuing/_cardholder_service.py | 8 -- stripe/issuing/_dispute_service.py | 10 -- .../_personalization_design_service.py | 8 -- stripe/issuing/_physical_bundle_service.py | 4 - stripe/issuing/_token_service.py | 6 - stripe/issuing/_transaction_service.py | 6 - stripe/radar/_early_fraud_warning_service.py | 4 - stripe/radar/_value_list_item_service.py | 8 -- stripe/radar/_value_list_service.py | 10 -- stripe/reporting/_report_run_service.py | 6 - stripe/reporting/_report_type_service.py | 4 - stripe/sigma/_scheduled_query_run_service.py | 4 - stripe/tax/_calculation_line_item_service.py | 2 - stripe/tax/_calculation_service.py | 4 - stripe/tax/_registration_service.py | 8 -- stripe/tax/_settings_service.py | 4 - stripe/tax/_transaction_line_item_service.py | 2 - stripe/tax/_transaction_service.py | 6 - stripe/terminal/_configuration_service.py | 10 -- stripe/terminal/_connection_token_service.py | 2 - stripe/terminal/_location_service.py | 10 -- stripe/terminal/_reader_service.py | 20 ---- .../_confirmation_token_service.py | 2 - stripe/test_helpers/_customer_service.py | 2 - stripe/test_helpers/_refund_service.py | 2 - stripe/test_helpers/_test_clock_service.py | 10 -- .../issuing/_authorization_service.py | 12 -- stripe/test_helpers/issuing/_card_service.py | 8 -- .../_personalization_design_service.py | 6 - .../issuing/_transaction_service.py | 6 - .../test_helpers/terminal/_reader_service.py | 2 - .../treasury/_inbound_transfer_service.py | 6 - .../treasury/_outbound_payment_service.py | 8 -- .../treasury/_outbound_transfer_service.py | 8 -- .../treasury/_received_credit_service.py | 2 - .../treasury/_received_debit_service.py | 2 - stripe/treasury/_credit_reversal_service.py | 6 - stripe/treasury/_debit_reversal_service.py | 6 - .../_financial_account_features_service.py | 4 - stripe/treasury/_financial_account_service.py | 8 -- stripe/treasury/_inbound_transfer_service.py | 8 -- stripe/treasury/_outbound_payment_service.py | 8 -- stripe/treasury/_outbound_transfer_service.py | 8 -- stripe/treasury/_received_credit_service.py | 4 - stripe/treasury/_received_debit_service.py | 4 - stripe/treasury/_transaction_entry_service.py | 4 - stripe/treasury/_transaction_service.py | 4 - tests/test_api_requestor.py | 103 +++++------------- tests/test_stripe_object.py | 8 +- 158 files changed, 34 insertions(+), 1125 deletions(-) diff --git a/stripe/_account_capability_service.py b/stripe/_account_capability_service.py index 184b97c10..1c969b759 100644 --- a/stripe/_account_capability_service.py +++ b/stripe/_account_capability_service.py @@ -50,7 +50,6 @@ def list( "/v1/accounts/{account}/capabilities".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -73,7 +72,6 @@ async def list_async( "/v1/accounts/{account}/capabilities".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -98,7 +96,6 @@ def retrieve( account=sanitize_id(account), capability=sanitize_id(capability), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -123,7 +120,6 @@ async def retrieve_async( account=sanitize_id(account), capability=sanitize_id(capability), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -148,7 +144,6 @@ def update( account=sanitize_id(account), capability=sanitize_id(capability), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -173,7 +168,6 @@ async def update_async( account=sanitize_id(account), capability=sanitize_id(capability), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py index a048e69d5..e708b784b 100644 --- a/stripe/_account_external_account_service.py +++ b/stripe/_account_external_account_service.py @@ -220,7 +220,6 @@ def delete( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -245,7 +244,6 @@ async def delete_async( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -270,7 +268,6 @@ def retrieve( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -295,7 +292,6 @@ async def retrieve_async( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -327,7 +323,6 @@ def update( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -359,7 +354,6 @@ async def update_async( account=sanitize_id(account), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -382,7 +376,6 @@ def list( "/v1/accounts/{account}/external_accounts".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -405,7 +398,6 @@ async def list_async( "/v1/accounts/{account}/external_accounts".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -428,7 +420,6 @@ def create( "/v1/accounts/{account}/external_accounts".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -451,7 +442,6 @@ async def create_async( "/v1/accounts/{account}/external_accounts".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_link_service.py b/stripe/_account_link_service.py index a24f1e788..da1cddd79 100644 --- a/stripe/_account_link_service.py +++ b/stripe/_account_link_service.py @@ -63,7 +63,6 @@ def create( self._request( "post", "/v1/account_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -83,7 +82,6 @@ async def create_async( await self._request_async( "post", "/v1/account_links", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py index d46d42165..aa3d3dc7d 100644 --- a/stripe/_account_login_link_service.py +++ b/stripe/_account_login_link_service.py @@ -33,7 +33,6 @@ def create( "/v1/accounts/{account}/login_links".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -58,7 +57,6 @@ async def create_async( "/v1/accounts/{account}/login_links".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 0fe82b820..903d8e370 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -831,7 +831,6 @@ def delete( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -856,7 +855,6 @@ async def delete_async( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -881,7 +879,6 @@ def retrieve( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -906,7 +903,6 @@ async def retrieve_async( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -931,7 +927,6 @@ def update( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -956,7 +951,6 @@ async def update_async( account=sanitize_id(account), person=sanitize_id(person), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -979,7 +973,6 @@ def list( "/v1/accounts/{account}/persons".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1002,7 +995,6 @@ async def list_async( "/v1/accounts/{account}/persons".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1025,7 +1017,6 @@ def create( "/v1/accounts/{account}/persons".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1048,7 +1039,6 @@ async def create_async( "/v1/accounts/{account}/persons".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 11ccec68e..bf8142bc8 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -3334,7 +3334,6 @@ def delete( self._request( "delete", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3361,7 +3360,6 @@ async def delete_async( await self._request_async( "delete", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3382,7 +3380,6 @@ def retrieve( self._request( "get", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3403,7 +3400,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3436,7 +3432,6 @@ def update( self._request( "post", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3469,7 +3464,6 @@ async def update_async( await self._request_async( "post", "/v1/accounts/{account}".format(account=sanitize_id(account)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3489,7 +3483,6 @@ def retrieve_current( self._request( "get", "/v1/account", - api_mode="V1", base_address="api", params=params, options=options, @@ -3509,7 +3502,6 @@ async def retrieve_current_async( await self._request_async( "get", "/v1/account", - api_mode="V1", base_address="api", params=params, options=options, @@ -3529,7 +3521,6 @@ def list( self._request( "get", "/v1/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -3549,7 +3540,6 @@ async def list_async( await self._request_async( "get", "/v1/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -3574,7 +3564,6 @@ def create( self._request( "post", "/v1/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -3599,7 +3588,6 @@ async def create_async( await self._request_async( "post", "/v1/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -3624,7 +3612,6 @@ def reject( "/v1/accounts/{account}/reject".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3649,7 +3636,6 @@ async def reject_async( "/v1/accounts/{account}/reject".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index be5fb0dc0..52ea8afa3 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -337,7 +337,6 @@ def create( self._request( "post", "/v1/account_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -357,7 +356,6 @@ async def create_async( await self._request_async( "post", "/v1/account_sessions", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 62951eed8..61f3085eb 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -181,10 +181,10 @@ def request( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, usage: Optional[List[str]] = None, ) -> "StripeObject": requestor = self._replace_options(options) + api_mode = "V1" rbody, rcode, rheaders = requestor.request_raw( method.lower(), url, @@ -212,9 +212,9 @@ async def request_async( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, usage: Optional[List[str]] = None, ) -> "StripeObject": + api_mode = "V1" requestor = self._replace_options(options) rbody, rcode, rheaders = await requestor.request_raw_async( method.lower(), @@ -243,9 +243,9 @@ def request_stream( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, usage: Optional[List[str]] = None, ) -> StripeStreamResponse: + api_mode = "V1" stream, rcode, rheaders = self.request_raw( method.lower(), url, @@ -273,9 +273,9 @@ async def request_stream_async( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, usage: Optional[List[str]] = None, ) -> StripeStreamResponseAsync: + api_mode = "V1" stream, rcode, rheaders = await self.request_raw_async( method.lower(), url, diff --git a/stripe/_api_resource.py b/stripe/_api_resource.py index ea456719a..1fb402ab8 100644 --- a/stripe/_api_resource.py +++ b/stripe/_api_resource.py @@ -84,7 +84,6 @@ def _request( url, params=params, base_address=base_address, - api_mode=api_mode, ) if type(self) is type(obj): @@ -100,7 +99,6 @@ async def _request_async( params=None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ) -> StripeObject: obj = await StripeObject._request_async( self, @@ -108,11 +106,10 @@ async def _request_async( url, params=params, base_address=base_address, - api_mode=api_mode, ) if type(self) is type(obj): - self._refresh_from(values=obj, api_mode=api_mode) + self._refresh_from(values=obj, api_mode="V1") return self else: return obj @@ -133,7 +130,6 @@ def _request_and_refresh( url, params=params, base_address=base_address, - api_mode=api_mode, usage=usage, ) @@ -156,7 +152,6 @@ async def _request_and_refresh_async( url, params=params, base_address=base_address, - api_mode=api_mode, usage=usage, ) @@ -171,7 +166,6 @@ def _static_request( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ): request_options, request_params = extract_options_from_dict(params) return _APIRequestor._global_instance().request( @@ -180,7 +174,6 @@ def _static_request( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) @classmethod @@ -191,7 +184,6 @@ async def _static_request_async( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ): request_options, request_params = extract_options_from_dict(params) return await _APIRequestor._global_instance().request_async( @@ -200,7 +192,6 @@ async def _static_request_async( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) @classmethod @@ -211,7 +202,6 @@ def _static_request_stream( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ): request_options, request_params = extract_options_from_dict(params) return _APIRequestor._global_instance().request_stream( @@ -220,7 +210,6 @@ def _static_request_stream( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) @classmethod @@ -231,7 +220,6 @@ async def _static_request_stream_async( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ): request_options, request_params = extract_options_from_dict(params) return await _APIRequestor._global_instance().request_stream_async( @@ -240,5 +228,4 @@ async def _static_request_stream_async( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) diff --git a/stripe/_apple_pay_domain_service.py b/stripe/_apple_pay_domain_service.py index 112d8da00..c68c16146 100644 --- a/stripe/_apple_pay_domain_service.py +++ b/stripe/_apple_pay_domain_service.py @@ -61,7 +61,6 @@ def delete( "/v1/apple_pay/domains/{domain}".format( domain=sanitize_id(domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -84,7 +83,6 @@ async def delete_async( "/v1/apple_pay/domains/{domain}".format( domain=sanitize_id(domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -107,7 +105,6 @@ def retrieve( "/v1/apple_pay/domains/{domain}".format( domain=sanitize_id(domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -130,7 +127,6 @@ async def retrieve_async( "/v1/apple_pay/domains/{domain}".format( domain=sanitize_id(domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -150,7 +146,6 @@ def list( self._request( "get", "/v1/apple_pay/domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -170,7 +165,6 @@ async def list_async( await self._request_async( "get", "/v1/apple_pay/domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -190,7 +184,6 @@ def create( self._request( "post", "/v1/apple_pay/domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -210,7 +203,6 @@ async def create_async( await self._request_async( "post", "/v1/apple_pay/domains", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_application_fee_refund_service.py b/stripe/_application_fee_refund_service.py index 4f620585e..c77b577cf 100644 --- a/stripe/_application_fee_refund_service.py +++ b/stripe/_application_fee_refund_service.py @@ -76,7 +76,6 @@ def retrieve( fee=sanitize_id(fee), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -101,7 +100,6 @@ async def retrieve_async( fee=sanitize_id(fee), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -128,7 +126,6 @@ def update( fee=sanitize_id(fee), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -155,7 +152,6 @@ async def update_async( fee=sanitize_id(fee), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -176,7 +172,6 @@ def list( self._request( "get", "/v1/application_fees/{id}/refunds".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -197,7 +192,6 @@ async def list_async( await self._request_async( "get", "/v1/application_fees/{id}/refunds".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -226,7 +220,6 @@ def create( self._request( "post", "/v1/application_fees/{id}/refunds".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -255,7 +248,6 @@ async def create_async( await self._request_async( "post", "/v1/application_fees/{id}/refunds".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_application_fee_service.py b/stripe/_application_fee_service.py index b3db0ae8b..f142a5c37 100644 --- a/stripe/_application_fee_service.py +++ b/stripe/_application_fee_service.py @@ -78,7 +78,6 @@ def list( self._request( "get", "/v1/application_fees", - api_mode="V1", base_address="api", params=params, options=options, @@ -98,7 +97,6 @@ async def list_async( await self._request_async( "get", "/v1/application_fees", - api_mode="V1", base_address="api", params=params, options=options, @@ -119,7 +117,6 @@ def retrieve( self._request( "get", "/v1/application_fees/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -140,7 +137,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/application_fees/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_balance_service.py b/stripe/_balance_service.py index 7220f5030..f80dee999 100644 --- a/stripe/_balance_service.py +++ b/stripe/_balance_service.py @@ -28,7 +28,6 @@ def retrieve( self._request( "get", "/v1/balance", - api_mode="V1", base_address="api", params=params, options=options, @@ -49,7 +48,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/balance", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index d6abe402c..06ec1abce 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -87,7 +87,6 @@ def list( self._request( "get", "/v1/balance_transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -109,7 +108,6 @@ async def list_async( await self._request_async( "get", "/v1/balance_transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -132,7 +130,6 @@ def retrieve( self._request( "get", "/v1/balance_transactions/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -155,7 +152,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/balance_transactions/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index a079598a3..47506a7de 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -378,7 +378,6 @@ def list( self._request( "get", "/v1/charges", - api_mode="V1", base_address="api", params=params, options=options, @@ -398,7 +397,6 @@ async def list_async( await self._request_async( "get", "/v1/charges", - api_mode="V1", base_address="api", params=params, options=options, @@ -420,7 +418,6 @@ def create( self._request( "post", "/v1/charges", - api_mode="V1", base_address="api", params=params, options=options, @@ -442,7 +439,6 @@ async def create_async( await self._request_async( "post", "/v1/charges", - api_mode="V1", base_address="api", params=params, options=options, @@ -463,7 +459,6 @@ def retrieve( self._request( "get", "/v1/charges/{charge}".format(charge=sanitize_id(charge)), - api_mode="V1", base_address="api", params=params, options=options, @@ -484,7 +479,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/charges/{charge}".format(charge=sanitize_id(charge)), - api_mode="V1", base_address="api", params=params, options=options, @@ -505,7 +499,6 @@ def update( self._request( "post", "/v1/charges/{charge}".format(charge=sanitize_id(charge)), - api_mode="V1", base_address="api", params=params, options=options, @@ -526,7 +519,6 @@ async def update_async( await self._request_async( "post", "/v1/charges/{charge}".format(charge=sanitize_id(charge)), - api_mode="V1", base_address="api", params=params, options=options, @@ -549,7 +541,6 @@ def search( self._request( "get", "/v1/charges/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -572,7 +563,6 @@ async def search_async( await self._request_async( "get", "/v1/charges/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -599,7 +589,6 @@ def capture( "/v1/charges/{charge}/capture".format( charge=sanitize_id(charge), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -626,7 +615,6 @@ async def capture_async( "/v1/charges/{charge}/capture".format( charge=sanitize_id(charge), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_confirmation_token_service.py b/stripe/_confirmation_token_service.py index c26ce0038..2f42d4d11 100644 --- a/stripe/_confirmation_token_service.py +++ b/stripe/_confirmation_token_service.py @@ -31,7 +31,6 @@ def retrieve( "/v1/confirmation_tokens/{confirmation_token}".format( confirmation_token=sanitize_id(confirmation_token), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -54,7 +53,6 @@ async def retrieve_async( "/v1/confirmation_tokens/{confirmation_token}".format( confirmation_token=sanitize_id(confirmation_token), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_country_spec_service.py b/stripe/_country_spec_service.py index dbaa2b77b..914f6f62c 100644 --- a/stripe/_country_spec_service.py +++ b/stripe/_country_spec_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/country_specs", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/country_specs", - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +88,6 @@ def retrieve( "/v1/country_specs/{country}".format( country=sanitize_id(country), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +110,6 @@ async def retrieve_async( "/v1/country_specs/{country}".format( country=sanitize_id(country), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_coupon_service.py b/stripe/_coupon_service.py index 15bda53f1..665088b22 100644 --- a/stripe/_coupon_service.py +++ b/stripe/_coupon_service.py @@ -167,7 +167,6 @@ def delete( self._request( "delete", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -188,7 +187,6 @@ async def delete_async( await self._request_async( "delete", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -209,7 +207,6 @@ def retrieve( self._request( "get", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -230,7 +227,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +247,6 @@ def update( self._request( "post", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -272,7 +267,6 @@ async def update_async( await self._request_async( "post", "/v1/coupons/{coupon}".format(coupon=sanitize_id(coupon)), - api_mode="V1", base_address="api", params=params, options=options, @@ -292,7 +286,6 @@ def list( self._request( "get", "/v1/coupons", - api_mode="V1", base_address="api", params=params, options=options, @@ -312,7 +305,6 @@ async def list_async( await self._request_async( "get", "/v1/coupons", - api_mode="V1", base_address="api", params=params, options=options, @@ -334,7 +326,6 @@ def create( self._request( "post", "/v1/coupons", - api_mode="V1", base_address="api", params=params, options=options, @@ -356,7 +347,6 @@ async def create_async( await self._request_async( "post", "/v1/coupons", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_credit_note_line_item_service.py b/stripe/_credit_note_line_item_service.py index 094bd3057..ce267b123 100644 --- a/stripe/_credit_note_line_item_service.py +++ b/stripe/_credit_note_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/credit_notes/{credit_note}/lines".format( credit_note=sanitize_id(credit_note), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/credit_notes/{credit_note}/lines".format( credit_note=sanitize_id(credit_note), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index fa41fb7c0..10cc91426 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -163,7 +163,6 @@ def list( self._request( "get", "/v1/credit_notes/preview/lines", - api_mode="V1", base_address="api", params=params, options=options, @@ -183,7 +182,6 @@ async def list_async( await self._request_async( "get", "/v1/credit_notes/preview/lines", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index a076ce15b..774b1a8c8 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -360,7 +360,6 @@ def list( self._request( "get", "/v1/credit_notes", - api_mode="V1", base_address="api", params=params, options=options, @@ -380,7 +379,6 @@ async def list_async( await self._request_async( "get", "/v1/credit_notes", - api_mode="V1", base_address="api", params=params, options=options, @@ -413,7 +411,6 @@ def create( self._request( "post", "/v1/credit_notes", - api_mode="V1", base_address="api", params=params, options=options, @@ -446,7 +443,6 @@ async def create_async( await self._request_async( "post", "/v1/credit_notes", - api_mode="V1", base_address="api", params=params, options=options, @@ -467,7 +463,6 @@ def retrieve( self._request( "get", "/v1/credit_notes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -488,7 +483,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/credit_notes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -509,7 +503,6 @@ def update( self._request( "post", "/v1/credit_notes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -530,7 +523,6 @@ async def update_async( await self._request_async( "post", "/v1/credit_notes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -550,7 +542,6 @@ def preview( self._request( "get", "/v1/credit_notes/preview", - api_mode="V1", base_address="api", params=params, options=options, @@ -570,7 +561,6 @@ async def preview_async( await self._request_async( "get", "/v1/credit_notes/preview", - api_mode="V1", base_address="api", params=params, options=options, @@ -591,7 +581,6 @@ def void_credit_note( self._request( "post", "/v1/credit_notes/{id}/void".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -612,7 +601,6 @@ async def void_credit_note_async( await self._request_async( "post", "/v1/credit_notes/{id}/void".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_balance_transaction_service.py b/stripe/_customer_balance_transaction_service.py index 20291adac..d8b8d1f41 100644 --- a/stripe/_customer_balance_transaction_service.py +++ b/stripe/_customer_balance_transaction_service.py @@ -86,7 +86,6 @@ def list( "/v1/customers/{customer}/balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -109,7 +108,6 @@ async def list_async( "/v1/customers/{customer}/balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -132,7 +130,6 @@ def create( "/v1/customers/{customer}/balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -155,7 +152,6 @@ async def create_async( "/v1/customers/{customer}/balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -180,7 +176,6 @@ def retrieve( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -205,7 +200,6 @@ async def retrieve_async( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -230,7 +224,6 @@ def update( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -255,7 +248,6 @@ async def update_async( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_cash_balance_service.py b/stripe/_customer_cash_balance_service.py index 5d50a3302..a3f3cc41e 100644 --- a/stripe/_customer_cash_balance_service.py +++ b/stripe/_customer_cash_balance_service.py @@ -51,7 +51,6 @@ def retrieve( "/v1/customers/{customer}/cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -74,7 +73,6 @@ async def retrieve_async( "/v1/customers/{customer}/cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -97,7 +95,6 @@ def update( "/v1/customers/{customer}/cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -120,7 +117,6 @@ async def update_async( "/v1/customers/{customer}/cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_cash_balance_transaction_service.py b/stripe/_customer_cash_balance_transaction_service.py index 5e8a8bbb1..70c09590f 100644 --- a/stripe/_customer_cash_balance_transaction_service.py +++ b/stripe/_customer_cash_balance_transaction_service.py @@ -52,7 +52,6 @@ def list( "/v1/customers/{customer}/cash_balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -75,7 +74,6 @@ async def list_async( "/v1/customers/{customer}/cash_balance_transactions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -100,7 +98,6 @@ def retrieve( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -125,7 +122,6 @@ async def retrieve_async( customer=sanitize_id(customer), transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_funding_instructions_service.py b/stripe/_customer_funding_instructions_service.py index 0b287c8e4..6c2614742 100644 --- a/stripe/_customer_funding_instructions_service.py +++ b/stripe/_customer_funding_instructions_service.py @@ -79,7 +79,6 @@ def create( "/v1/customers/{customer}/funding_instructions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -104,7 +103,6 @@ async def create_async( "/v1/customers/{customer}/funding_instructions".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index 31a03d337..e1749bf91 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -100,7 +100,6 @@ def list( "/v1/customers/{customer}/payment_methods".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -123,7 +122,6 @@ async def list_async( "/v1/customers/{customer}/payment_methods".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -148,7 +146,6 @@ def retrieve( customer=sanitize_id(customer), payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -173,7 +170,6 @@ async def retrieve_async( customer=sanitize_id(customer), payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_payment_source_service.py b/stripe/_customer_payment_source_service.py index 0c70b7de2..b05bf03cb 100644 --- a/stripe/_customer_payment_source_service.py +++ b/stripe/_customer_payment_source_service.py @@ -189,7 +189,6 @@ def list( "/v1/customers/{customer}/sources".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -212,7 +211,6 @@ async def list_async( "/v1/customers/{customer}/sources".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -239,7 +237,6 @@ def create( "/v1/customers/{customer}/sources".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -266,7 +263,6 @@ async def create_async( "/v1/customers/{customer}/sources".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -291,7 +287,6 @@ def retrieve( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -316,7 +311,6 @@ async def retrieve_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -341,7 +335,6 @@ def update( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -366,7 +359,6 @@ async def update_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -391,7 +383,6 @@ def delete( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -416,7 +407,6 @@ async def delete_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -441,7 +431,6 @@ def verify( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -466,7 +455,6 @@ async def verify_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index a3456afc3..16f5f092e 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -666,7 +666,6 @@ def delete( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -689,7 +688,6 @@ async def delete_async( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -712,7 +710,6 @@ def retrieve( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -735,7 +732,6 @@ async def retrieve_async( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -760,7 +756,6 @@ def update( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -785,7 +780,6 @@ async def update_async( "/v1/customers/{customer}".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -808,7 +802,6 @@ def delete_discount( "/v1/customers/{customer}/discount".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -831,7 +824,6 @@ async def delete_discount_async( "/v1/customers/{customer}/discount".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -851,7 +843,6 @@ def list( self._request( "get", "/v1/customers", - api_mode="V1", base_address="api", params=params, options=options, @@ -871,7 +862,6 @@ async def list_async( await self._request_async( "get", "/v1/customers", - api_mode="V1", base_address="api", params=params, options=options, @@ -891,7 +881,6 @@ def create( self._request( "post", "/v1/customers", - api_mode="V1", base_address="api", params=params, options=options, @@ -911,7 +900,6 @@ async def create_async( await self._request_async( "post", "/v1/customers", - api_mode="V1", base_address="api", params=params, options=options, @@ -934,7 +922,6 @@ def search( self._request( "get", "/v1/customers/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -957,7 +944,6 @@ async def search_async( await self._request_async( "get", "/v1/customers/search", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py index f2c01ec87..820ab18a4 100644 --- a/stripe/_customer_session_service.py +++ b/stripe/_customer_session_service.py @@ -117,7 +117,6 @@ def create( self._request( "post", "/v1/customer_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +136,6 @@ async def create_async( await self._request_async( "post", "/v1/customer_sessions", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index ed126cdbf..5efa2382e 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -143,7 +143,6 @@ def delete( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -168,7 +167,6 @@ async def delete_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -193,7 +191,6 @@ def retrieve( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -218,7 +215,6 @@ async def retrieve_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -241,7 +237,6 @@ def list( "/v1/customers/{customer}/tax_ids".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -264,7 +259,6 @@ async def list_async( "/v1/customers/{customer}/tax_ids".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -287,7 +281,6 @@ def create( "/v1/customers/{customer}/tax_ids".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -310,7 +303,6 @@ async def create_async( "/v1/customers/{customer}/tax_ids".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_dispute_service.py b/stripe/_dispute_service.py index 1502f1e50..e55049146 100644 --- a/stripe/_dispute_service.py +++ b/stripe/_dispute_service.py @@ -211,7 +211,6 @@ def list( self._request( "get", "/v1/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +230,6 @@ async def list_async( await self._request_async( "get", "/v1/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -252,7 +250,6 @@ def retrieve( self._request( "get", "/v1/disputes/{dispute}".format(dispute=sanitize_id(dispute)), - api_mode="V1", base_address="api", params=params, options=options, @@ -273,7 +270,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/disputes/{dispute}".format(dispute=sanitize_id(dispute)), - api_mode="V1", base_address="api", params=params, options=options, @@ -296,7 +292,6 @@ def update( self._request( "post", "/v1/disputes/{dispute}".format(dispute=sanitize_id(dispute)), - api_mode="V1", base_address="api", params=params, options=options, @@ -319,7 +314,6 @@ async def update_async( await self._request_async( "post", "/v1/disputes/{dispute}".format(dispute=sanitize_id(dispute)), - api_mode="V1", base_address="api", params=params, options=options, @@ -344,7 +338,6 @@ def close( "/v1/disputes/{dispute}/close".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -369,7 +362,6 @@ async def close_async( "/v1/disputes/{dispute}/close".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_ephemeral_key.py b/stripe/_ephemeral_key.py index 9fd5fd5ca..dca9fd62b 100644 --- a/stripe/_ephemeral_key.py +++ b/stripe/_ephemeral_key.py @@ -157,5 +157,4 @@ def create(cls, **params): url, params=params, base_address="api", - api_mode="V1", ) diff --git a/stripe/_ephemeral_key_service.py b/stripe/_ephemeral_key_service.py index 1e3c139a6..61d5ea7d6 100644 --- a/stripe/_ephemeral_key_service.py +++ b/stripe/_ephemeral_key_service.py @@ -51,7 +51,6 @@ def delete( self._request( "delete", "/v1/ephemeral_keys/{key}".format(key=sanitize_id(key)), - api_mode="V1", base_address="api", params=params, options=options, @@ -72,7 +71,6 @@ async def delete_async( await self._request_async( "delete", "/v1/ephemeral_keys/{key}".format(key=sanitize_id(key)), - api_mode="V1", base_address="api", params=params, options=options, @@ -92,7 +90,6 @@ def create( self._request( "post", "/v1/ephemeral_keys", - api_mode="V1", base_address="api", params=params, options=options, @@ -112,7 +109,6 @@ async def create_async( await self._request_async( "post", "/v1/ephemeral_keys", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_event_service.py b/stripe/_event_service.py index 89d21c043..745512086 100644 --- a/stripe/_event_service.py +++ b/stripe/_event_service.py @@ -81,7 +81,6 @@ def list( self._request( "get", "/v1/events", - api_mode="V1", base_address="api", params=params, options=options, @@ -101,7 +100,6 @@ async def list_async( await self._request_async( "get", "/v1/events", - api_mode="V1", base_address="api", params=params, options=options, @@ -122,7 +120,6 @@ def retrieve( self._request( "get", "/v1/events/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -143,7 +140,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/events/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_exchange_rate_service.py b/stripe/_exchange_rate_service.py index a187e2b36..3df40614c 100644 --- a/stripe/_exchange_rate_service.py +++ b/stripe/_exchange_rate_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/exchange_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/exchange_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +88,6 @@ def retrieve( "/v1/exchange_rates/{rate_id}".format( rate_id=sanitize_id(rate_id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +110,6 @@ async def retrieve_async( "/v1/exchange_rates/{rate_id}".format( rate_id=sanitize_id(rate_id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_file.py b/stripe/_file.py index 20cf02120..65c797a6c 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -218,7 +218,6 @@ def create(cls, **params: Unpack["File.CreateParams"]) -> "File": cls.class_url(), params=params, base_address="files", - api_mode="V1", ), ) @@ -240,7 +239,6 @@ async def create_async( cls.class_url(), params=params, base_address="files", - api_mode="V1", ), ) diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index a7426ea13..41166ff6f 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -109,7 +109,6 @@ def list( self._request( "get", "/v1/file_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -129,7 +128,6 @@ async def list_async( await self._request_async( "get", "/v1/file_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -149,7 +147,6 @@ def create( self._request( "post", "/v1/file_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -169,7 +166,6 @@ async def create_async( await self._request_async( "post", "/v1/file_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -190,7 +186,6 @@ def retrieve( self._request( "get", "/v1/file_links/{link}".format(link=sanitize_id(link)), - api_mode="V1", base_address="api", params=params, options=options, @@ -211,7 +206,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/file_links/{link}".format(link=sanitize_id(link)), - api_mode="V1", base_address="api", params=params, options=options, @@ -232,7 +226,6 @@ def update( self._request( "post", "/v1/file_links/{link}".format(link=sanitize_id(link)), - api_mode="V1", base_address="api", params=params, options=options, @@ -253,7 +246,6 @@ async def update_async( await self._request_async( "post", "/v1/file_links/{link}".format(link=sanitize_id(link)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 12162f285..367109272 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -134,7 +134,6 @@ def list( self._request( "get", "/v1/files", - api_mode="V1", base_address="api", params=params, options=options, @@ -154,7 +153,6 @@ async def list_async( await self._request_async( "get", "/v1/files", - api_mode="V1", base_address="api", params=params, options=options, @@ -175,7 +173,6 @@ def create( self._request( "post", "/v1/files", - api_mode="V1", base_address="files", params=params, options=options, @@ -196,7 +193,6 @@ async def create_async( await self._request_async( "post", "/v1/files", - api_mode="V1", base_address="files", params=params, options=options, @@ -217,7 +213,6 @@ def retrieve( self._request( "get", "/v1/files/{file}".format(file=sanitize_id(file)), - api_mode="V1", base_address="api", params=params, options=options, @@ -238,7 +233,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/files/{file}".format(file=sanitize_id(file)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py index aa97cd0c7..7a780a6b9 100644 --- a/stripe/_invoice_item_service.py +++ b/stripe/_invoice_item_service.py @@ -331,7 +331,6 @@ def delete( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -354,7 +353,6 @@ async def delete_async( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -377,7 +375,6 @@ def retrieve( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -400,7 +397,6 @@ async def retrieve_async( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -423,7 +419,6 @@ def update( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -446,7 +441,6 @@ async def update_async( "/v1/invoiceitems/{invoiceitem}".format( invoiceitem=sanitize_id(invoiceitem), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -466,7 +460,6 @@ def list( self._request( "get", "/v1/invoiceitems", - api_mode="V1", base_address="api", params=params, options=options, @@ -486,7 +479,6 @@ async def list_async( await self._request_async( "get", "/v1/invoiceitems", - api_mode="V1", base_address="api", params=params, options=options, @@ -506,7 +498,6 @@ def create( self._request( "post", "/v1/invoiceitems", - api_mode="V1", base_address="api", params=params, options=options, @@ -526,7 +517,6 @@ async def create_async( await self._request_async( "post", "/v1/invoiceitems", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index b17ba4214..3130ebda8 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -241,7 +241,6 @@ def list( "/v1/invoices/{invoice}/lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -264,7 +263,6 @@ async def list_async( "/v1/invoices/{invoice}/lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -292,7 +290,6 @@ def update( invoice=sanitize_id(invoice), line_item_id=sanitize_id(line_item_id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -320,7 +317,6 @@ async def update_async( invoice=sanitize_id(invoice), line_item_id=sanitize_id(line_item_id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 6981cdccd..9ba1ab735 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -3978,7 +3978,6 @@ def delete( self._request( "delete", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -3999,7 +3998,6 @@ async def delete_async( await self._request_async( "delete", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -4020,7 +4018,6 @@ def retrieve( self._request( "get", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -4041,7 +4038,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -4067,7 +4063,6 @@ def update( self._request( "post", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -4093,7 +4088,6 @@ async def update_async( await self._request_async( "post", "/v1/invoices/{invoice}".format(invoice=sanitize_id(invoice)), - api_mode="V1", base_address="api", params=params, options=options, @@ -4113,7 +4107,6 @@ def list( self._request( "get", "/v1/invoices", - api_mode="V1", base_address="api", params=params, options=options, @@ -4133,7 +4126,6 @@ async def list_async( await self._request_async( "get", "/v1/invoices", - api_mode="V1", base_address="api", params=params, options=options, @@ -4153,7 +4145,6 @@ def create( self._request( "post", "/v1/invoices", - api_mode="V1", base_address="api", params=params, options=options, @@ -4173,7 +4164,6 @@ async def create_async( await self._request_async( "post", "/v1/invoices", - api_mode="V1", base_address="api", params=params, options=options, @@ -4196,7 +4186,6 @@ def search( self._request( "get", "/v1/invoices/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -4219,7 +4208,6 @@ async def search_async( await self._request_async( "get", "/v1/invoices/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -4245,7 +4233,6 @@ def upcoming( self._request( "get", "/v1/invoices/upcoming", - api_mode="V1", base_address="api", params=params, options=options, @@ -4271,7 +4258,6 @@ async def upcoming_async( await self._request_async( "get", "/v1/invoices/upcoming", - api_mode="V1", base_address="api", params=params, options=options, @@ -4294,7 +4280,6 @@ def add_lines( "/v1/invoices/{invoice}/add_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4317,7 +4302,6 @@ async def add_lines_async( "/v1/invoices/{invoice}/add_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4340,7 +4324,6 @@ def finalize_invoice( "/v1/invoices/{invoice}/finalize".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4363,7 +4346,6 @@ async def finalize_invoice_async( "/v1/invoices/{invoice}/finalize".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4386,7 +4368,6 @@ def mark_uncollectible( "/v1/invoices/{invoice}/mark_uncollectible".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4409,7 +4390,6 @@ async def mark_uncollectible_async( "/v1/invoices/{invoice}/mark_uncollectible".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4432,7 +4412,6 @@ def pay( "/v1/invoices/{invoice}/pay".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4455,7 +4434,6 @@ async def pay_async( "/v1/invoices/{invoice}/pay".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4478,7 +4456,6 @@ def remove_lines( "/v1/invoices/{invoice}/remove_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4501,7 +4478,6 @@ async def remove_lines_async( "/v1/invoices/{invoice}/remove_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4526,7 +4502,6 @@ def send_invoice( "/v1/invoices/{invoice}/send".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4551,7 +4526,6 @@ async def send_invoice_async( "/v1/invoices/{invoice}/send".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4574,7 +4548,6 @@ def update_lines( "/v1/invoices/{invoice}/update_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4597,7 +4570,6 @@ async def update_lines_async( "/v1/invoices/{invoice}/update_lines".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4622,7 +4594,6 @@ def void_invoice( "/v1/invoices/{invoice}/void".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4647,7 +4618,6 @@ async def void_invoice_async( "/v1/invoices/{invoice}/void".format( invoice=sanitize_id(invoice), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -4673,7 +4643,6 @@ def create_preview( self._request( "post", "/v1/invoices/create_preview", - api_mode="V1", base_address="api", params=params, options=options, @@ -4699,7 +4668,6 @@ async def create_preview_async( await self._request_async( "post", "/v1/invoices/create_preview", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 23216c534..80cb30a6a 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -1168,7 +1168,6 @@ def list( self._request( "get", "/v1/invoices/upcoming/lines", - api_mode="V1", base_address="api", params=params, options=options, @@ -1188,7 +1187,6 @@ async def list_async( await self._request_async( "get", "/v1/invoices/upcoming/lines", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_list_object.py b/stripe/_list_object.py index bb007269f..71814cbcf 100644 --- a/stripe/_list_object.py +++ b/stripe/_list_object.py @@ -48,7 +48,6 @@ def list(self, **params: Mapping[str, Any]) -> Self: self._get_url_for_list(), params=params, base_address="api", - api_mode="V1", ), ) @@ -60,7 +59,6 @@ async def list_async(self, **params: Mapping[str, Any]) -> Self: self._get_url_for_list(), params=params, base_address="api", - api_mode="V1", ), ) @@ -77,7 +75,6 @@ def create(self, **params: Mapping[str, Any]) -> T: url, params=params, base_address="api", - api_mode="V1", ), ) @@ -96,7 +93,6 @@ def retrieve(self, id: str, **params: Mapping[str, Any]): url, params=params, base_address="api", - api_mode="V1", ), ) diff --git a/stripe/_mandate_service.py b/stripe/_mandate_service.py index 52c0c6ca1..a8d603563 100644 --- a/stripe/_mandate_service.py +++ b/stripe/_mandate_service.py @@ -29,7 +29,6 @@ def retrieve( self._request( "get", "/v1/mandates/{mandate}".format(mandate=sanitize_id(mandate)), - api_mode="V1", base_address="api", params=params, options=options, @@ -50,7 +49,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/mandates/{mandate}".format(mandate=sanitize_id(mandate)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_oauth.py b/stripe/_oauth.py index e0050c7e1..c2bd478b0 100644 --- a/stripe/_oauth.py +++ b/stripe/_oauth.py @@ -333,7 +333,6 @@ def token( params=params, options=options, base_address="connect", - api_mode="V1", ), ) @@ -352,6 +351,5 @@ def deauthorize( params=params, options=options, base_address="connect", - api_mode="V1", ), ) diff --git a/stripe/_oauth_service.py b/stripe/_oauth_service.py index 480cd6f12..7c24269f5 100644 --- a/stripe/_oauth_service.py +++ b/stripe/_oauth_service.py @@ -78,7 +78,6 @@ def token( params=params, options=options, base_address="connect", - api_mode="V1", ), ) @@ -96,6 +95,5 @@ def deauthorize( params=params, options=options, base_address="connect", - api_mode="V1", ), ) diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 7e005149d..b63deeff4 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -7214,7 +7214,6 @@ def list( self._request( "get", "/v1/payment_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -7234,7 +7233,6 @@ async def list_async( await self._request_async( "get", "/v1/payment_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -7263,7 +7261,6 @@ def create( self._request( "post", "/v1/payment_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -7292,7 +7289,6 @@ async def create_async( await self._request_async( "post", "/v1/payment_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -7319,7 +7315,6 @@ def retrieve( "/v1/payment_intents/{intent}".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7346,7 +7341,6 @@ async def retrieve_async( "/v1/payment_intents/{intent}".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7375,7 +7369,6 @@ def update( "/v1/payment_intents/{intent}".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7404,7 +7397,6 @@ async def update_async( "/v1/payment_intents/{intent}".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7427,7 +7419,6 @@ def search( self._request( "get", "/v1/payment_intents/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -7450,7 +7441,6 @@ async def search_async( await self._request_async( "get", "/v1/payment_intents/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -7473,7 +7463,6 @@ def apply_customer_balance( "/v1/payment_intents/{intent}/apply_customer_balance".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7496,7 +7485,6 @@ async def apply_customer_balance_async( "/v1/payment_intents/{intent}/apply_customer_balance".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7523,7 +7511,6 @@ def cancel( "/v1/payment_intents/{intent}/cancel".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7550,7 +7537,6 @@ async def cancel_async( "/v1/payment_intents/{intent}/cancel".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7577,7 +7563,6 @@ def capture( "/v1/payment_intents/{intent}/capture".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7604,7 +7589,6 @@ async def capture_async( "/v1/payment_intents/{intent}/capture".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7648,7 +7632,6 @@ def confirm( "/v1/payment_intents/{intent}/confirm".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7692,7 +7675,6 @@ async def confirm_async( "/v1/payment_intents/{intent}/confirm".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7738,7 +7720,6 @@ def increment_authorization( "/v1/payment_intents/{intent}/increment_authorization".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7784,7 +7765,6 @@ async def increment_authorization_async( "/v1/payment_intents/{intent}/increment_authorization".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7807,7 +7787,6 @@ def verify_microdeposits( "/v1/payment_intents/{intent}/verify_microdeposits".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -7830,7 +7809,6 @@ async def verify_microdeposits_async( "/v1/payment_intents/{intent}/verify_microdeposits".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payment_link_line_item_service.py b/stripe/_payment_link_line_item_service.py index 93bdead2e..8484bd147 100644 --- a/stripe/_payment_link_line_item_service.py +++ b/stripe/_payment_link_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/payment_links/{payment_link}/line_items".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/payment_links/{payment_link}/line_items".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index f6ee75608..b1dacbc1d 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -1685,7 +1685,6 @@ def list( self._request( "get", "/v1/payment_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -1705,7 +1704,6 @@ async def list_async( await self._request_async( "get", "/v1/payment_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -1725,7 +1723,6 @@ def create( self._request( "post", "/v1/payment_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -1745,7 +1742,6 @@ async def create_async( await self._request_async( "post", "/v1/payment_links", - api_mode="V1", base_address="api", params=params, options=options, @@ -1768,7 +1764,6 @@ def retrieve( "/v1/payment_links/{payment_link}".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1791,7 +1786,6 @@ async def retrieve_async( "/v1/payment_links/{payment_link}".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1814,7 +1808,6 @@ def update( "/v1/payment_links/{payment_link}".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1837,7 +1830,6 @@ async def update_async( "/v1/payment_links/{payment_link}".format( payment_link=sanitize_id(payment_link), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index 4b36c7c66..d43649ab1 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -1683,7 +1683,6 @@ def list( self._request( "get", "/v1/payment_method_configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1703,7 +1702,6 @@ async def list_async( await self._request_async( "get", "/v1/payment_method_configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1723,7 +1721,6 @@ def create( self._request( "post", "/v1/payment_method_configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1743,7 +1740,6 @@ async def create_async( await self._request_async( "post", "/v1/payment_method_configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1766,7 +1762,6 @@ def retrieve( "/v1/payment_method_configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1789,7 +1784,6 @@ async def retrieve_async( "/v1/payment_method_configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1812,7 +1806,6 @@ def update( "/v1/payment_method_configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1835,7 +1828,6 @@ async def update_async( "/v1/payment_method_configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payment_method_domain_service.py b/stripe/_payment_method_domain_service.py index 24692f54a..5452daa9b 100644 --- a/stripe/_payment_method_domain_service.py +++ b/stripe/_payment_method_domain_service.py @@ -85,7 +85,6 @@ def list( self._request( "get", "/v1/payment_method_domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -105,7 +104,6 @@ async def list_async( await self._request_async( "get", "/v1/payment_method_domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -125,7 +123,6 @@ def create( self._request( "post", "/v1/payment_method_domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -145,7 +142,6 @@ async def create_async( await self._request_async( "post", "/v1/payment_method_domains", - api_mode="V1", base_address="api", params=params, options=options, @@ -168,7 +164,6 @@ def retrieve( "/v1/payment_method_domains/{payment_method_domain}".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -191,7 +186,6 @@ async def retrieve_async( "/v1/payment_method_domains/{payment_method_domain}".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -214,7 +208,6 @@ def update( "/v1/payment_method_domains/{payment_method_domain}".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -237,7 +230,6 @@ async def update_async( "/v1/payment_method_domains/{payment_method_domain}".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -265,7 +257,6 @@ def validate( "/v1/payment_method_domains/{payment_method_domain}/validate".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -293,7 +284,6 @@ async def validate_async( "/v1/payment_method_domains/{payment_method_domain}/validate".format( payment_method_domain=sanitize_id(payment_method_domain), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 8f6a18872..45c33c23e 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -855,7 +855,6 @@ def list( self._request( "get", "/v1/payment_methods", - api_mode="V1", base_address="api", params=params, options=options, @@ -875,7 +874,6 @@ async def list_async( await self._request_async( "get", "/v1/payment_methods", - api_mode="V1", base_address="api", params=params, options=options, @@ -897,7 +895,6 @@ def create( self._request( "post", "/v1/payment_methods", - api_mode="V1", base_address="api", params=params, options=options, @@ -919,7 +916,6 @@ async def create_async( await self._request_async( "post", "/v1/payment_methods", - api_mode="V1", base_address="api", params=params, options=options, @@ -942,7 +938,6 @@ def retrieve( "/v1/payment_methods/{payment_method}".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -965,7 +960,6 @@ async def retrieve_async( "/v1/payment_methods/{payment_method}".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -988,7 +982,6 @@ def update( "/v1/payment_methods/{payment_method}".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1011,7 +1004,6 @@ async def update_async( "/v1/payment_methods/{payment_method}".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1046,7 +1038,6 @@ def attach( "/v1/payment_methods/{payment_method}/attach".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1081,7 +1072,6 @@ async def attach_async( "/v1/payment_methods/{payment_method}/attach".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1104,7 +1094,6 @@ def detach( "/v1/payment_methods/{payment_method}/detach".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1127,7 +1116,6 @@ async def detach_async( "/v1/payment_methods/{payment_method}/detach".format( payment_method=sanitize_id(payment_method), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_payout_service.py b/stripe/_payout_service.py index 2d579cd7a..e78adee99 100644 --- a/stripe/_payout_service.py +++ b/stripe/_payout_service.py @@ -163,7 +163,6 @@ def list( self._request( "get", "/v1/payouts", - api_mode="V1", base_address="api", params=params, options=options, @@ -183,7 +182,6 @@ async def list_async( await self._request_async( "get", "/v1/payouts", - api_mode="V1", base_address="api", params=params, options=options, @@ -207,7 +205,6 @@ def create( self._request( "post", "/v1/payouts", - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +228,6 @@ async def create_async( await self._request_async( "post", "/v1/payouts", - api_mode="V1", base_address="api", params=params, options=options, @@ -252,7 +248,6 @@ def retrieve( self._request( "get", "/v1/payouts/{payout}".format(payout=sanitize_id(payout)), - api_mode="V1", base_address="api", params=params, options=options, @@ -273,7 +268,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/payouts/{payout}".format(payout=sanitize_id(payout)), - api_mode="V1", base_address="api", params=params, options=options, @@ -294,7 +288,6 @@ def update( self._request( "post", "/v1/payouts/{payout}".format(payout=sanitize_id(payout)), - api_mode="V1", base_address="api", params=params, options=options, @@ -315,7 +308,6 @@ async def update_async( await self._request_async( "post", "/v1/payouts/{payout}".format(payout=sanitize_id(payout)), - api_mode="V1", base_address="api", params=params, options=options, @@ -338,7 +330,6 @@ def cancel( "/v1/payouts/{payout}/cancel".format( payout=sanitize_id(payout), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -361,7 +352,6 @@ async def cancel_async( "/v1/payouts/{payout}/cancel".format( payout=sanitize_id(payout), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -386,7 +376,6 @@ def reverse( "/v1/payouts/{payout}/reverse".format( payout=sanitize_id(payout), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -411,7 +400,6 @@ async def reverse_async( "/v1/payouts/{payout}/reverse".format( payout=sanitize_id(payout), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_plan_service.py b/stripe/_plan_service.py index 1e6e35759..606b55fce 100644 --- a/stripe/_plan_service.py +++ b/stripe/_plan_service.py @@ -248,7 +248,6 @@ def delete( self._request( "delete", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -269,7 +268,6 @@ async def delete_async( await self._request_async( "delete", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -290,7 +288,6 @@ def retrieve( self._request( "get", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -311,7 +308,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -332,7 +328,6 @@ def update( self._request( "post", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -353,7 +348,6 @@ async def update_async( await self._request_async( "post", "/v1/plans/{plan}".format(plan=sanitize_id(plan)), - api_mode="V1", base_address="api", params=params, options=options, @@ -373,7 +367,6 @@ def list( self._request( "get", "/v1/plans", - api_mode="V1", base_address="api", params=params, options=options, @@ -393,7 +386,6 @@ async def list_async( await self._request_async( "get", "/v1/plans", - api_mode="V1", base_address="api", params=params, options=options, @@ -411,7 +403,6 @@ def create( self._request( "post", "/v1/plans", - api_mode="V1", base_address="api", params=params, options=options, @@ -429,7 +420,6 @@ async def create_async( await self._request_async( "post", "/v1/plans", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_price_service.py b/stripe/_price_service.py index bf2388309..327d66fef 100644 --- a/stripe/_price_service.py +++ b/stripe/_price_service.py @@ -496,7 +496,6 @@ def list( self._request( "get", "/v1/prices", - api_mode="V1", base_address="api", params=params, options=options, @@ -516,7 +515,6 @@ async def list_async( await self._request_async( "get", "/v1/prices", - api_mode="V1", base_address="api", params=params, options=options, @@ -534,7 +532,6 @@ def create( self._request( "post", "/v1/prices", - api_mode="V1", base_address="api", params=params, options=options, @@ -552,7 +549,6 @@ async def create_async( await self._request_async( "post", "/v1/prices", - api_mode="V1", base_address="api", params=params, options=options, @@ -573,7 +569,6 @@ def retrieve( self._request( "get", "/v1/prices/{price}".format(price=sanitize_id(price)), - api_mode="V1", base_address="api", params=params, options=options, @@ -594,7 +589,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/prices/{price}".format(price=sanitize_id(price)), - api_mode="V1", base_address="api", params=params, options=options, @@ -615,7 +609,6 @@ def update( self._request( "post", "/v1/prices/{price}".format(price=sanitize_id(price)), - api_mode="V1", base_address="api", params=params, options=options, @@ -636,7 +629,6 @@ async def update_async( await self._request_async( "post", "/v1/prices/{price}".format(price=sanitize_id(price)), - api_mode="V1", base_address="api", params=params, options=options, @@ -657,7 +649,6 @@ def search( self._request( "get", "/v1/prices/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -678,7 +669,6 @@ async def search_async( await self._request_async( "get", "/v1/prices/search", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_product_feature_service.py b/stripe/_product_feature_service.py index dfda8ed8f..da0cc37ca 100644 --- a/stripe/_product_feature_service.py +++ b/stripe/_product_feature_service.py @@ -65,7 +65,6 @@ def delete( product=sanitize_id(product), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +89,6 @@ async def delete_async( product=sanitize_id(product), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -115,7 +113,6 @@ def retrieve( product=sanitize_id(product), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -140,7 +137,6 @@ async def retrieve_async( product=sanitize_id(product), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -163,7 +159,6 @@ def list( "/v1/products/{product}/features".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -186,7 +181,6 @@ async def list_async( "/v1/products/{product}/features".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -209,7 +203,6 @@ def create( "/v1/products/{product}/features".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -232,7 +225,6 @@ async def create_async( "/v1/products/{product}/features".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_product_service.py b/stripe/_product_service.py index cde4ad8a0..817c190b6 100644 --- a/stripe/_product_service.py +++ b/stripe/_product_service.py @@ -422,7 +422,6 @@ def delete( self._request( "delete", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -443,7 +442,6 @@ async def delete_async( await self._request_async( "delete", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -464,7 +462,6 @@ def retrieve( self._request( "get", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -485,7 +482,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -506,7 +502,6 @@ def update( self._request( "post", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -527,7 +522,6 @@ async def update_async( await self._request_async( "post", "/v1/products/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -547,7 +541,6 @@ def list( self._request( "get", "/v1/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -567,7 +560,6 @@ async def list_async( await self._request_async( "get", "/v1/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -587,7 +579,6 @@ def create( self._request( "post", "/v1/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -607,7 +598,6 @@ async def create_async( await self._request_async( "post", "/v1/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -630,7 +620,6 @@ def search( self._request( "get", "/v1/products/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -653,7 +642,6 @@ async def search_async( await self._request_async( "get", "/v1/products/search", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_promotion_code_service.py b/stripe/_promotion_code_service.py index bdd6734b2..b3eeed7b3 100644 --- a/stripe/_promotion_code_service.py +++ b/stripe/_promotion_code_service.py @@ -191,7 +191,6 @@ def list( self._request( "get", "/v1/promotion_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -211,7 +210,6 @@ async def list_async( await self._request_async( "get", "/v1/promotion_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +229,6 @@ def create( self._request( "post", "/v1/promotion_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +248,6 @@ async def create_async( await self._request_async( "post", "/v1/promotion_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -274,7 +270,6 @@ def retrieve( "/v1/promotion_codes/{promotion_code}".format( promotion_code=sanitize_id(promotion_code), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -297,7 +292,6 @@ async def retrieve_async( "/v1/promotion_codes/{promotion_code}".format( promotion_code=sanitize_id(promotion_code), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -320,7 +314,6 @@ def update( "/v1/promotion_codes/{promotion_code}".format( promotion_code=sanitize_id(promotion_code), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -343,7 +336,6 @@ async def update_async( "/v1/promotion_codes/{promotion_code}".format( promotion_code=sanitize_id(promotion_code), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_quote_computed_upfront_line_items_service.py b/stripe/_quote_computed_upfront_line_items_service.py index f653aeac3..a32accc96 100644 --- a/stripe/_quote_computed_upfront_line_items_service.py +++ b/stripe/_quote_computed_upfront_line_items_service.py @@ -44,7 +44,6 @@ def list( "/v1/quotes/{quote}/computed_upfront_line_items".format( quote=sanitize_id(quote), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/quotes/{quote}/computed_upfront_line_items".format( quote=sanitize_id(quote), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_quote_line_item_service.py b/stripe/_quote_line_item_service.py index b69093b44..1f8b8e3d0 100644 --- a/stripe/_quote_line_item_service.py +++ b/stripe/_quote_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/quotes/{quote}/line_items".format( quote=sanitize_id(quote), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/quotes/{quote}/line_items".format( quote=sanitize_id(quote), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index 8db87912b..c5d72560f 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -626,7 +626,6 @@ def list( self._request( "get", "/v1/quotes", - api_mode="V1", base_address="api", params=params, options=options, @@ -646,7 +645,6 @@ async def list_async( await self._request_async( "get", "/v1/quotes", - api_mode="V1", base_address="api", params=params, options=options, @@ -666,7 +664,6 @@ def create( self._request( "post", "/v1/quotes", - api_mode="V1", base_address="api", params=params, options=options, @@ -686,7 +683,6 @@ async def create_async( await self._request_async( "post", "/v1/quotes", - api_mode="V1", base_address="api", params=params, options=options, @@ -707,7 +703,6 @@ def retrieve( self._request( "get", "/v1/quotes/{quote}".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -728,7 +723,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/quotes/{quote}".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -749,7 +743,6 @@ def update( self._request( "post", "/v1/quotes/{quote}".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -770,7 +763,6 @@ async def update_async( await self._request_async( "post", "/v1/quotes/{quote}".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -791,7 +783,6 @@ def accept( self._request( "post", "/v1/quotes/{quote}/accept".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -812,7 +803,6 @@ async def accept_async( await self._request_async( "post", "/v1/quotes/{quote}/accept".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -833,7 +823,6 @@ def cancel( self._request( "post", "/v1/quotes/{quote}/cancel".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -854,7 +843,6 @@ async def cancel_async( await self._request_async( "post", "/v1/quotes/{quote}/cancel".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -875,7 +863,6 @@ def finalize_quote( self._request( "post", "/v1/quotes/{quote}/finalize".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -896,7 +883,6 @@ async def finalize_quote_async( await self._request_async( "post", "/v1/quotes/{quote}/finalize".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="api", params=params, options=options, @@ -917,7 +903,6 @@ def pdf( self._request_stream( "get", "/v1/quotes/{quote}/pdf".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="files", params=params, options=options, @@ -938,7 +923,6 @@ async def pdf_async( await self._request_stream_async( "get", "/v1/quotes/{quote}/pdf".format(quote=sanitize_id(quote)), - api_mode="V1", base_address="files", params=params, options=options, diff --git a/stripe/_refund_service.py b/stripe/_refund_service.py index 9608e8af7..ad8d7a418 100644 --- a/stripe/_refund_service.py +++ b/stripe/_refund_service.py @@ -144,7 +144,6 @@ def list( self._request( "get", "/v1/refunds", - api_mode="V1", base_address="api", params=params, options=options, @@ -164,7 +163,6 @@ async def list_async( await self._request_async( "get", "/v1/refunds", - api_mode="V1", base_address="api", params=params, options=options, @@ -194,7 +192,6 @@ def create( self._request( "post", "/v1/refunds", - api_mode="V1", base_address="api", params=params, options=options, @@ -224,7 +221,6 @@ async def create_async( await self._request_async( "post", "/v1/refunds", - api_mode="V1", base_address="api", params=params, options=options, @@ -245,7 +241,6 @@ def retrieve( self._request( "get", "/v1/refunds/{refund}".format(refund=sanitize_id(refund)), - api_mode="V1", base_address="api", params=params, options=options, @@ -266,7 +261,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/refunds/{refund}".format(refund=sanitize_id(refund)), - api_mode="V1", base_address="api", params=params, options=options, @@ -289,7 +283,6 @@ def update( self._request( "post", "/v1/refunds/{refund}".format(refund=sanitize_id(refund)), - api_mode="V1", base_address="api", params=params, options=options, @@ -312,7 +305,6 @@ async def update_async( await self._request_async( "post", "/v1/refunds/{refund}".format(refund=sanitize_id(refund)), - api_mode="V1", base_address="api", params=params, options=options, @@ -337,7 +329,6 @@ def cancel( "/v1/refunds/{refund}/cancel".format( refund=sanitize_id(refund), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -362,7 +353,6 @@ async def cancel_async( "/v1/refunds/{refund}/cancel".format( refund=sanitize_id(refund), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_review_service.py b/stripe/_review_service.py index 5d09a3301..b739b3a41 100644 --- a/stripe/_review_service.py +++ b/stripe/_review_service.py @@ -75,7 +75,6 @@ def list( self._request( "get", "/v1/reviews", - api_mode="V1", base_address="api", params=params, options=options, @@ -95,7 +94,6 @@ async def list_async( await self._request_async( "get", "/v1/reviews", - api_mode="V1", base_address="api", params=params, options=options, @@ -116,7 +114,6 @@ def retrieve( self._request( "get", "/v1/reviews/{review}".format(review=sanitize_id(review)), - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +134,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/reviews/{review}".format(review=sanitize_id(review)), - api_mode="V1", base_address="api", params=params, options=options, @@ -160,7 +156,6 @@ def approve( "/v1/reviews/{review}/approve".format( review=sanitize_id(review), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -183,7 +178,6 @@ async def approve_async( "/v1/reviews/{review}/approve".format( review=sanitize_id(review), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_search_result_object.py b/stripe/_search_result_object.py index 9b78c848e..73b1329c7 100644 --- a/stripe/_search_result_object.py +++ b/stripe/_search_result_object.py @@ -56,7 +56,6 @@ def search(self, **params: Mapping[str, Any]) -> Self: self._get_url_for_search(), params=params, base_address="api", - api_mode="V1", ), ) @@ -68,7 +67,6 @@ async def _search_async(self, **params: Mapping[str, Any]) -> Self: self._get_url_for_search(), params=params, base_address="api", - api_mode="V1", ), ) diff --git a/stripe/_setup_attempt_service.py b/stripe/_setup_attempt_service.py index ba3ff2065..6be48b135 100644 --- a/stripe/_setup_attempt_service.py +++ b/stripe/_setup_attempt_service.py @@ -69,7 +69,6 @@ def list( self._request( "get", "/v1/setup_attempts", - api_mode="V1", base_address="api", params=params, options=options, @@ -89,7 +88,6 @@ async def list_async( await self._request_async( "get", "/v1/setup_attempts", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index fb4dda1ee..d65aaa4b6 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -3471,7 +3471,6 @@ def list( self._request( "get", "/v1/setup_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -3491,7 +3490,6 @@ async def list_async( await self._request_async( "get", "/v1/setup_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -3514,7 +3512,6 @@ def create( self._request( "post", "/v1/setup_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -3537,7 +3534,6 @@ async def create_async( await self._request_async( "post", "/v1/setup_intents", - api_mode="V1", base_address="api", params=params, options=options, @@ -3564,7 +3560,6 @@ def retrieve( "/v1/setup_intents/{intent}".format( intent=sanitize_id(intent) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3591,7 +3586,6 @@ async def retrieve_async( "/v1/setup_intents/{intent}".format( intent=sanitize_id(intent) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3614,7 +3608,6 @@ def update( "/v1/setup_intents/{intent}".format( intent=sanitize_id(intent) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3637,7 +3630,6 @@ async def update_async( "/v1/setup_intents/{intent}".format( intent=sanitize_id(intent) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3662,7 +3654,6 @@ def cancel( "/v1/setup_intents/{intent}/cancel".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3687,7 +3678,6 @@ async def cancel_async( "/v1/setup_intents/{intent}/cancel".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3723,7 +3713,6 @@ def confirm( "/v1/setup_intents/{intent}/confirm".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3759,7 +3748,6 @@ async def confirm_async( "/v1/setup_intents/{intent}/confirm".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3782,7 +3770,6 @@ def verify_microdeposits( "/v1/setup_intents/{intent}/verify_microdeposits".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -3805,7 +3792,6 @@ async def verify_microdeposits_async( "/v1/setup_intents/{intent}/verify_microdeposits".format( intent=sanitize_id(intent), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_shipping_rate_service.py b/stripe/_shipping_rate_service.py index 2e6c3f964..10c789582 100644 --- a/stripe/_shipping_rate_service.py +++ b/stripe/_shipping_rate_service.py @@ -231,7 +231,6 @@ def list( self._request( "get", "/v1/shipping_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +250,6 @@ async def list_async( await self._request_async( "get", "/v1/shipping_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -271,7 +269,6 @@ def create( self._request( "post", "/v1/shipping_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -291,7 +288,6 @@ async def create_async( await self._request_async( "post", "/v1/shipping_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -314,7 +310,6 @@ def retrieve( "/v1/shipping_rates/{shipping_rate_token}".format( shipping_rate_token=sanitize_id(shipping_rate_token), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -337,7 +332,6 @@ async def retrieve_async( "/v1/shipping_rates/{shipping_rate_token}".format( shipping_rate_token=sanitize_id(shipping_rate_token), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -360,7 +354,6 @@ def update( "/v1/shipping_rates/{shipping_rate_token}".format( shipping_rate_token=sanitize_id(shipping_rate_token), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -383,7 +376,6 @@ async def update_async( "/v1/shipping_rates/{shipping_rate_token}".format( shipping_rate_token=sanitize_id(shipping_rate_token), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_source_service.py b/stripe/_source_service.py index d5444be03..34e60a857 100644 --- a/stripe/_source_service.py +++ b/stripe/_source_service.py @@ -555,7 +555,6 @@ def detach( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -580,7 +579,6 @@ async def detach_async( customer=sanitize_id(customer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -601,7 +599,6 @@ def retrieve( self._request( "get", "/v1/sources/{source}".format(source=sanitize_id(source)), - api_mode="V1", base_address="api", params=params, options=options, @@ -622,7 +619,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/sources/{source}".format(source=sanitize_id(source)), - api_mode="V1", base_address="api", params=params, options=options, @@ -645,7 +641,6 @@ def update( self._request( "post", "/v1/sources/{source}".format(source=sanitize_id(source)), - api_mode="V1", base_address="api", params=params, options=options, @@ -668,7 +663,6 @@ async def update_async( await self._request_async( "post", "/v1/sources/{source}".format(source=sanitize_id(source)), - api_mode="V1", base_address="api", params=params, options=options, @@ -688,7 +682,6 @@ def create( self._request( "post", "/v1/sources", - api_mode="V1", base_address="api", params=params, options=options, @@ -708,7 +701,6 @@ async def create_async( await self._request_async( "post", "/v1/sources", - api_mode="V1", base_address="api", params=params, options=options, @@ -731,7 +723,6 @@ def verify( "/v1/sources/{source}/verify".format( source=sanitize_id(source), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -754,7 +745,6 @@ async def verify_async( "/v1/sources/{source}/verify".format( source=sanitize_id(source), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_source_transaction_service.py b/stripe/_source_transaction_service.py index 022868032..8bb2db908 100644 --- a/stripe/_source_transaction_service.py +++ b/stripe/_source_transaction_service.py @@ -44,7 +44,6 @@ def list( "/v1/sources/{source}/source_transactions".format( source=sanitize_id(source), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/sources/{source}/source_transactions".format( source=sanitize_id(source), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index 1e7bff5d9..2cc00104d 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -382,7 +382,6 @@ def request( params: Optional[Dict[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ) -> "StripeObject": return StripeObject._request( self, @@ -390,7 +389,6 @@ def request( url, params=params, base_address=base_address, - api_mode=api_mode, ) def _request( @@ -401,7 +399,6 @@ def _request( usage: Optional[List[str]] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> "StripeObject": if params is None: params = self._retrieve_params @@ -414,7 +411,6 @@ def _request( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, usage=usage, ) @@ -426,7 +422,6 @@ async def _request_async( usage: Optional[List[str]] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> "StripeObject": if params is None: params = self._retrieve_params @@ -439,7 +434,6 @@ async def _request_async( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, usage=usage, ) @@ -450,7 +444,6 @@ def _request_stream( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ) -> StripeStreamResponse: if params is None: params = self._retrieve_params @@ -462,7 +455,6 @@ def _request_stream( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) async def _request_stream_async( @@ -472,7 +464,6 @@ async def _request_stream_async( params: Optional[Mapping[str, Any]] = None, *, base_address: BaseAddress = "api", - api_mode: ApiMode = "V1", ) -> StripeStreamResponseAsync: if params is None: params = self._retrieve_params @@ -484,7 +475,6 @@ async def _request_stream_async( params=request_params, options=request_options, base_address=base_address, - api_mode=api_mode, ) def __repr__(self) -> str: diff --git a/stripe/_stripe_service.py b/stripe/_stripe_service.py index 218d8b39e..e72279f41 100644 --- a/stripe/_stripe_service.py +++ b/stripe/_stripe_service.py @@ -8,7 +8,6 @@ from stripe._stripe_object import StripeObject from stripe._request_options import RequestOptions from stripe._base_address import BaseAddress -from stripe._api_mode import ApiMode from typing import Any, Mapping, Optional @@ -27,7 +26,6 @@ def _request( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> StripeObject: return self._requestor.request( method, @@ -35,7 +33,6 @@ def _request( params, options, base_address=base_address, - api_mode=api_mode, usage=["stripe_client"], ) @@ -47,7 +44,6 @@ async def _request_async( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> StripeObject: return await self._requestor.request_async( method, @@ -55,7 +51,6 @@ async def _request_async( params, options, base_address=base_address, - api_mode=api_mode, usage=["stripe_client"], ) @@ -67,7 +62,6 @@ def _request_stream( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> StripeStreamResponse: return self._requestor.request_stream( method, @@ -75,7 +69,6 @@ def _request_stream( params, options, base_address=base_address, - api_mode=api_mode, usage=["stripe_client"], ) @@ -87,7 +80,6 @@ async def _request_stream_async( options: Optional[RequestOptions] = None, *, base_address: BaseAddress, - api_mode: ApiMode, ) -> StripeStreamResponseAsync: return await self._requestor.request_stream_async( method, @@ -95,6 +87,5 @@ async def _request_stream_async( params, options, base_address=base_address, - api_mode=api_mode, usage=["stripe_client"], ) diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index ae5d8232e..2fea81ff9 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -351,7 +351,6 @@ def delete( self._request( "delete", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -372,7 +371,6 @@ async def delete_async( await self._request_async( "delete", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -393,7 +391,6 @@ def retrieve( self._request( "get", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -414,7 +411,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -435,7 +431,6 @@ def update( self._request( "post", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -456,7 +451,6 @@ async def update_async( await self._request_async( "post", "/v1/subscription_items/{item}".format(item=sanitize_id(item)), - api_mode="V1", base_address="api", params=params, options=options, @@ -476,7 +470,6 @@ def list( self._request( "get", "/v1/subscription_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -496,7 +489,6 @@ async def list_async( await self._request_async( "get", "/v1/subscription_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -516,7 +508,6 @@ def create( self._request( "post", "/v1/subscription_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -536,7 +527,6 @@ async def create_async( await self._request_async( "post", "/v1/subscription_items", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_subscription_item_usage_record_service.py b/stripe/_subscription_item_usage_record_service.py index 85c41210d..76826d6f9 100644 --- a/stripe/_subscription_item_usage_record_service.py +++ b/stripe/_subscription_item_usage_record_service.py @@ -49,7 +49,6 @@ def create( "/v1/subscription_items/{subscription_item}/usage_records".format( subscription_item=sanitize_id(subscription_item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -78,7 +77,6 @@ async def create_async( "/v1/subscription_items/{subscription_item}/usage_records".format( subscription_item=sanitize_id(subscription_item), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_subscription_item_usage_record_summary_service.py b/stripe/_subscription_item_usage_record_summary_service.py index 4eb3cfd31..c5e6d6543 100644 --- a/stripe/_subscription_item_usage_record_summary_service.py +++ b/stripe/_subscription_item_usage_record_summary_service.py @@ -46,7 +46,6 @@ def list( "/v1/subscription_items/{subscription_item}/usage_record_summaries".format( subscription_item=sanitize_id(subscription_item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -71,7 +70,6 @@ async def list_async( "/v1/subscription_items/{subscription_item}/usage_record_summaries".format( subscription_item=sanitize_id(subscription_item), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index 48bd47bfb..4ec8d5603 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -1197,7 +1197,6 @@ def list( self._request( "get", "/v1/subscription_schedules", - api_mode="V1", base_address="api", params=params, options=options, @@ -1217,7 +1216,6 @@ async def list_async( await self._request_async( "get", "/v1/subscription_schedules", - api_mode="V1", base_address="api", params=params, options=options, @@ -1237,7 +1235,6 @@ def create( self._request( "post", "/v1/subscription_schedules", - api_mode="V1", base_address="api", params=params, options=options, @@ -1257,7 +1254,6 @@ async def create_async( await self._request_async( "post", "/v1/subscription_schedules", - api_mode="V1", base_address="api", params=params, options=options, @@ -1280,7 +1276,6 @@ def retrieve( "/v1/subscription_schedules/{schedule}".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1303,7 +1298,6 @@ async def retrieve_async( "/v1/subscription_schedules/{schedule}".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1326,7 +1320,6 @@ def update( "/v1/subscription_schedules/{schedule}".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1349,7 +1342,6 @@ async def update_async( "/v1/subscription_schedules/{schedule}".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1372,7 +1364,6 @@ def cancel( "/v1/subscription_schedules/{schedule}/cancel".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1395,7 +1386,6 @@ async def cancel_async( "/v1/subscription_schedules/{schedule}/cancel".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1418,7 +1408,6 @@ def release( "/v1/subscription_schedules/{schedule}/release".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1441,7 +1430,6 @@ async def release_async( "/v1/subscription_schedules/{schedule}/release".format( schedule=sanitize_id(schedule), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 527d44d93..f183dc291 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -1656,7 +1656,6 @@ def cancel( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1685,7 +1684,6 @@ async def cancel_async( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1710,7 +1708,6 @@ def retrieve( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1735,7 +1732,6 @@ async def retrieve_async( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1780,7 +1776,6 @@ def update( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1825,7 +1820,6 @@ async def update_async( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1850,7 +1844,6 @@ def delete_discount( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1875,7 +1868,6 @@ async def delete_discount_async( subscription_exposed_id ), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1895,7 +1887,6 @@ def list( self._request( "get", "/v1/subscriptions", - api_mode="V1", base_address="api", params=params, options=options, @@ -1915,7 +1906,6 @@ async def list_async( await self._request_async( "get", "/v1/subscriptions", - api_mode="V1", base_address="api", params=params, options=options, @@ -1941,7 +1931,6 @@ def create( self._request( "post", "/v1/subscriptions", - api_mode="V1", base_address="api", params=params, options=options, @@ -1967,7 +1956,6 @@ async def create_async( await self._request_async( "post", "/v1/subscriptions", - api_mode="V1", base_address="api", params=params, options=options, @@ -1990,7 +1978,6 @@ def search( self._request( "get", "/v1/subscriptions/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -2013,7 +2000,6 @@ async def search_async( await self._request_async( "get", "/v1/subscriptions/search", - api_mode="V1", base_address="api", params=params, options=options, @@ -2036,7 +2022,6 @@ def resume( "/v1/subscriptions/{subscription}/resume".format( subscription=sanitize_id(subscription), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2059,7 +2044,6 @@ async def resume_async( "/v1/subscriptions/{subscription}/resume".format( subscription=sanitize_id(subscription), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_tax_code_service.py b/stripe/_tax_code_service.py index 4ed661d52..dfcb9c70b 100644 --- a/stripe/_tax_code_service.py +++ b/stripe/_tax_code_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/tax_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/tax_codes", - api_mode="V1", base_address="api", params=params, options=options, @@ -88,7 +86,6 @@ def retrieve( self._request( "get", "/v1/tax_codes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -109,7 +106,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/tax_codes/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index aa6e28c27..c2b1546df 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -175,7 +175,6 @@ def delete( self._request( "delete", "/v1/tax_ids/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -196,7 +195,6 @@ async def delete_async( await self._request_async( "delete", "/v1/tax_ids/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -217,7 +215,6 @@ def retrieve( self._request( "get", "/v1/tax_ids/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -238,7 +235,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/tax_ids/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -258,7 +254,6 @@ def list( self._request( "get", "/v1/tax_ids", - api_mode="V1", base_address="api", params=params, options=options, @@ -278,7 +273,6 @@ async def list_async( await self._request_async( "get", "/v1/tax_ids", - api_mode="V1", base_address="api", params=params, options=options, @@ -296,7 +290,6 @@ def create( self._request( "post", "/v1/tax_ids", - api_mode="V1", base_address="api", params=params, options=options, @@ -314,7 +307,6 @@ async def create_async( await self._request_async( "post", "/v1/tax_ids", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index ffcc6d5ef..61399dec6 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -191,7 +191,6 @@ def list( self._request( "get", "/v1/tax_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -211,7 +210,6 @@ async def list_async( await self._request_async( "get", "/v1/tax_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +229,6 @@ def create( self._request( "post", "/v1/tax_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +248,6 @@ async def create_async( await self._request_async( "post", "/v1/tax_rates", - api_mode="V1", base_address="api", params=params, options=options, @@ -274,7 +270,6 @@ def retrieve( "/v1/tax_rates/{tax_rate}".format( tax_rate=sanitize_id(tax_rate), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -297,7 +292,6 @@ async def retrieve_async( "/v1/tax_rates/{tax_rate}".format( tax_rate=sanitize_id(tax_rate), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -320,7 +314,6 @@ def update( "/v1/tax_rates/{tax_rate}".format( tax_rate=sanitize_id(tax_rate), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -343,7 +336,6 @@ async def update_async( "/v1/tax_rates/{tax_rate}".format( tax_rate=sanitize_id(tax_rate), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 422b953dd..9fe918393 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -1059,7 +1059,6 @@ def retrieve( self._request( "get", "/v1/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, @@ -1080,7 +1079,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, @@ -1101,7 +1099,6 @@ def create( self._request( "post", "/v1/tokens", - api_mode="V1", base_address="api", params=params, options=options, @@ -1122,7 +1119,6 @@ async def create_async( await self._request_async( "post", "/v1/tokens", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_topup_service.py b/stripe/_topup_service.py index eeeeae7d9..db18e82a7 100644 --- a/stripe/_topup_service.py +++ b/stripe/_topup_service.py @@ -151,7 +151,6 @@ def list( self._request( "get", "/v1/topups", - api_mode="V1", base_address="api", params=params, options=options, @@ -171,7 +170,6 @@ async def list_async( await self._request_async( "get", "/v1/topups", - api_mode="V1", base_address="api", params=params, options=options, @@ -189,7 +187,6 @@ def create( self._request( "post", "/v1/topups", - api_mode="V1", base_address="api", params=params, options=options, @@ -207,7 +204,6 @@ async def create_async( await self._request_async( "post", "/v1/topups", - api_mode="V1", base_address="api", params=params, options=options, @@ -228,7 +224,6 @@ def retrieve( self._request( "get", "/v1/topups/{topup}".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, @@ -249,7 +244,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/topups/{topup}".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, @@ -270,7 +264,6 @@ def update( self._request( "post", "/v1/topups/{topup}".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, @@ -291,7 +284,6 @@ async def update_async( await self._request_async( "post", "/v1/topups/{topup}".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, @@ -312,7 +304,6 @@ def cancel( self._request( "post", "/v1/topups/{topup}/cancel".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, @@ -333,7 +324,6 @@ async def cancel_async( await self._request_async( "post", "/v1/topups/{topup}/cancel".format(topup=sanitize_id(topup)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_transfer_reversal_service.py b/stripe/_transfer_reversal_service.py index 4d083ce14..8b707162d 100644 --- a/stripe/_transfer_reversal_service.py +++ b/stripe/_transfer_reversal_service.py @@ -80,7 +80,6 @@ def list( self._request( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -101,7 +100,6 @@ async def list_async( await self._request_async( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -126,7 +124,6 @@ def create( self._request( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -151,7 +148,6 @@ async def create_async( await self._request_async( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -176,7 +172,6 @@ def retrieve( transfer=sanitize_id(transfer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -201,7 +196,6 @@ async def retrieve_async( transfer=sanitize_id(transfer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -228,7 +222,6 @@ def update( transfer=sanitize_id(transfer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -255,7 +248,6 @@ async def update_async( transfer=sanitize_id(transfer), id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_transfer_service.py b/stripe/_transfer_service.py index df63bcd02..cdf6436c8 100644 --- a/stripe/_transfer_service.py +++ b/stripe/_transfer_service.py @@ -134,7 +134,6 @@ def list( self._request( "get", "/v1/transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -154,7 +153,6 @@ async def list_async( await self._request_async( "get", "/v1/transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -174,7 +172,6 @@ def create( self._request( "post", "/v1/transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -194,7 +191,6 @@ async def create_async( await self._request_async( "post", "/v1/transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -217,7 +213,6 @@ def retrieve( "/v1/transfers/{transfer}".format( transfer=sanitize_id(transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -240,7 +235,6 @@ async def retrieve_async( "/v1/transfers/{transfer}".format( transfer=sanitize_id(transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -265,7 +259,6 @@ def update( "/v1/transfers/{transfer}".format( transfer=sanitize_id(transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -290,7 +283,6 @@ async def update_async( "/v1/transfers/{transfer}".format( transfer=sanitize_id(transfer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/_usage_record.py b/stripe/_usage_record.py index fdd9cebd4..a53744404 100644 --- a/stripe/_usage_record.py +++ b/stripe/_usage_record.py @@ -54,5 +54,4 @@ def create(cls, **params): url, params=params, base_address="api", - api_mode="V1", ) diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 0fc6698fc..2acb57b8c 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -698,7 +698,6 @@ def delete( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -721,7 +720,6 @@ async def delete_async( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -744,7 +742,6 @@ def retrieve( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -767,7 +764,6 @@ async def retrieve_async( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -790,7 +786,6 @@ def update( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -813,7 +808,6 @@ async def update_async( "/v1/webhook_endpoints/{webhook_endpoint}".format( webhook_endpoint=sanitize_id(webhook_endpoint), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -833,7 +827,6 @@ def list( self._request( "get", "/v1/webhook_endpoints", - api_mode="V1", base_address="api", params=params, options=options, @@ -853,7 +846,6 @@ async def list_async( await self._request_async( "get", "/v1/webhook_endpoints", - api_mode="V1", base_address="api", params=params, options=options, @@ -873,7 +865,6 @@ def create( self._request( "post", "/v1/webhook_endpoints", - api_mode="V1", base_address="api", params=params, options=options, @@ -893,7 +884,6 @@ async def create_async( await self._request_async( "post", "/v1/webhook_endpoints", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/apps/_secret_service.py b/stripe/apps/_secret_service.py index cdc3b0648..5bfc13786 100644 --- a/stripe/apps/_secret_service.py +++ b/stripe/apps/_secret_service.py @@ -132,7 +132,6 @@ def list( self._request( "get", "/v1/apps/secrets", - api_mode="V1", base_address="api", params=params, options=options, @@ -150,7 +149,6 @@ async def list_async( await self._request_async( "get", "/v1/apps/secrets", - api_mode="V1", base_address="api", params=params, options=options, @@ -170,7 +168,6 @@ def create( self._request( "post", "/v1/apps/secrets", - api_mode="V1", base_address="api", params=params, options=options, @@ -190,7 +187,6 @@ async def create_async( await self._request_async( "post", "/v1/apps/secrets", - api_mode="V1", base_address="api", params=params, options=options, @@ -208,7 +204,6 @@ def find( self._request( "get", "/v1/apps/secrets/find", - api_mode="V1", base_address="api", params=params, options=options, @@ -226,7 +221,6 @@ async def find_async( await self._request_async( "get", "/v1/apps/secrets/find", - api_mode="V1", base_address="api", params=params, options=options, @@ -246,7 +240,6 @@ def delete_where( self._request( "post", "/v1/apps/secrets/delete", - api_mode="V1", base_address="api", params=params, options=options, @@ -266,7 +259,6 @@ async def delete_where_async( await self._request_async( "post", "/v1/apps/secrets/delete", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index b3952ac19..31bda7bdb 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -117,7 +117,6 @@ def list( self._request( "get", "/v1/billing/alerts", - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +136,6 @@ async def list_async( await self._request_async( "get", "/v1/billing/alerts", - api_mode="V1", base_address="api", params=params, options=options, @@ -155,7 +153,6 @@ def create( self._request( "post", "/v1/billing/alerts", - api_mode="V1", base_address="api", params=params, options=options, @@ -173,7 +170,6 @@ async def create_async( await self._request_async( "post", "/v1/billing/alerts", - api_mode="V1", base_address="api", params=params, options=options, @@ -194,7 +190,6 @@ def retrieve( self._request( "get", "/v1/billing/alerts/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -215,7 +210,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/billing/alerts/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -236,7 +230,6 @@ def activate( self._request( "post", "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -257,7 +250,6 @@ async def activate_async( await self._request_async( "post", "/v1/billing/alerts/{id}/activate".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -278,7 +270,6 @@ def archive( self._request( "post", "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -299,7 +290,6 @@ async def archive_async( await self._request_async( "post", "/v1/billing/alerts/{id}/archive".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -322,7 +312,6 @@ def deactivate( "/v1/billing/alerts/{id}/deactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -345,7 +334,6 @@ async def deactivate_async( "/v1/billing/alerts/{id}/deactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing/_meter_event_adjustment_service.py b/stripe/billing/_meter_event_adjustment_service.py index 038c74cc6..383b4a764 100644 --- a/stripe/billing/_meter_event_adjustment_service.py +++ b/stripe/billing/_meter_event_adjustment_service.py @@ -45,7 +45,6 @@ def create( self._request( "post", "/v1/billing/meter_event_adjustments", - api_mode="V1", base_address="api", params=params, options=options, @@ -65,7 +64,6 @@ async def create_async( await self._request_async( "post", "/v1/billing/meter_event_adjustments", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing/_meter_event_service.py b/stripe/billing/_meter_event_service.py index a8ad2beba..53214b534 100644 --- a/stripe/billing/_meter_event_service.py +++ b/stripe/billing/_meter_event_service.py @@ -43,7 +43,6 @@ def create( self._request( "post", "/v1/billing/meter_events", - api_mode="V1", base_address="api", params=params, options=options, @@ -63,7 +62,6 @@ async def create_async( await self._request_async( "post", "/v1/billing/meter_events", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing/_meter_event_summary_service.py b/stripe/billing/_meter_event_summary_service.py index 9f61f603a..dbfe8d46a 100644 --- a/stripe/billing/_meter_event_summary_service.py +++ b/stripe/billing/_meter_event_summary_service.py @@ -60,7 +60,6 @@ def list( "/v1/billing/meters/{id}/event_summaries".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -83,7 +82,6 @@ async def list_async( "/v1/billing/meters/{id}/event_summaries".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing/_meter_service.py b/stripe/billing/_meter_service.py index a2e78e36a..aed7176e0 100644 --- a/stripe/billing/_meter_service.py +++ b/stripe/billing/_meter_service.py @@ -134,7 +134,6 @@ def list( self._request( "get", "/v1/billing/meters", - api_mode="V1", base_address="api", params=params, options=options, @@ -154,7 +153,6 @@ async def list_async( await self._request_async( "get", "/v1/billing/meters", - api_mode="V1", base_address="api", params=params, options=options, @@ -172,7 +170,6 @@ def create( self._request( "post", "/v1/billing/meters", - api_mode="V1", base_address="api", params=params, options=options, @@ -190,7 +187,6 @@ async def create_async( await self._request_async( "post", "/v1/billing/meters", - api_mode="V1", base_address="api", params=params, options=options, @@ -211,7 +207,6 @@ def retrieve( self._request( "get", "/v1/billing/meters/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -232,7 +227,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/billing/meters/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -253,7 +247,6 @@ def update( self._request( "post", "/v1/billing/meters/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -274,7 +267,6 @@ async def update_async( await self._request_async( "post", "/v1/billing/meters/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -297,7 +289,6 @@ def deactivate( "/v1/billing/meters/{id}/deactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -320,7 +311,6 @@ async def deactivate_async( "/v1/billing/meters/{id}/deactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -343,7 +333,6 @@ def reactivate( "/v1/billing/meters/{id}/reactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -366,7 +355,6 @@ async def reactivate_async( "/v1/billing/meters/{id}/reactivate".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 6ccf99723..7cbc97444 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -418,7 +418,6 @@ def list( self._request( "get", "/v1/billing_portal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -438,7 +437,6 @@ async def list_async( await self._request_async( "get", "/v1/billing_portal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -458,7 +456,6 @@ def create( self._request( "post", "/v1/billing_portal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -478,7 +475,6 @@ async def create_async( await self._request_async( "post", "/v1/billing_portal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -501,7 +497,6 @@ def retrieve( "/v1/billing_portal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -524,7 +519,6 @@ async def retrieve_async( "/v1/billing_portal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -547,7 +541,6 @@ def update( "/v1/billing_portal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -570,7 +563,6 @@ async def update_async( "/v1/billing_portal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/billing_portal/_session_service.py b/stripe/billing_portal/_session_service.py index d34247ae0..d06d54667 100644 --- a/stripe/billing_portal/_session_service.py +++ b/stripe/billing_portal/_session_service.py @@ -246,7 +246,6 @@ def create( self._request( "post", "/v1/billing_portal/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -266,7 +265,6 @@ async def create_async( await self._request_async( "post", "/v1/billing_portal/sessions", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/checkout/_session_line_item_service.py b/stripe/checkout/_session_line_item_service.py index dc7317d12..133e884b2 100644 --- a/stripe/checkout/_session_line_item_service.py +++ b/stripe/checkout/_session_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/checkout/sessions/{session}/line_items".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/checkout/sessions/{session}/line_items".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 59750df82..10c03dcb6 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -2343,7 +2343,6 @@ def list( self._request( "get", "/v1/checkout/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -2363,7 +2362,6 @@ async def list_async( await self._request_async( "get", "/v1/checkout/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -2383,7 +2381,6 @@ def create( self._request( "post", "/v1/checkout/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -2403,7 +2400,6 @@ async def create_async( await self._request_async( "post", "/v1/checkout/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -2426,7 +2422,6 @@ def retrieve( "/v1/checkout/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2449,7 +2444,6 @@ async def retrieve_async( "/v1/checkout/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2472,7 +2466,6 @@ def update( "/v1/checkout/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2495,7 +2488,6 @@ async def update_async( "/v1/checkout/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2520,7 +2512,6 @@ def expire( "/v1/checkout/sessions/{session}/expire".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2545,7 +2536,6 @@ async def expire_async( "/v1/checkout/sessions/{session}/expire".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/climate/_order_service.py b/stripe/climate/_order_service.py index 0df6d6ef3..0c89ff260 100644 --- a/stripe/climate/_order_service.py +++ b/stripe/climate/_order_service.py @@ -112,7 +112,6 @@ def list( self._request( "get", "/v1/climate/orders", - api_mode="V1", base_address="api", params=params, options=options, @@ -133,7 +132,6 @@ async def list_async( await self._request_async( "get", "/v1/climate/orders", - api_mode="V1", base_address="api", params=params, options=options, @@ -152,7 +150,6 @@ def create( self._request( "post", "/v1/climate/orders", - api_mode="V1", base_address="api", params=params, options=options, @@ -171,7 +168,6 @@ async def create_async( await self._request_async( "post", "/v1/climate/orders", - api_mode="V1", base_address="api", params=params, options=options, @@ -192,7 +188,6 @@ def retrieve( self._request( "get", "/v1/climate/orders/{order}".format(order=sanitize_id(order)), - api_mode="V1", base_address="api", params=params, options=options, @@ -213,7 +208,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/climate/orders/{order}".format(order=sanitize_id(order)), - api_mode="V1", base_address="api", params=params, options=options, @@ -234,7 +228,6 @@ def update( self._request( "post", "/v1/climate/orders/{order}".format(order=sanitize_id(order)), - api_mode="V1", base_address="api", params=params, options=options, @@ -255,7 +248,6 @@ async def update_async( await self._request_async( "post", "/v1/climate/orders/{order}".format(order=sanitize_id(order)), - api_mode="V1", base_address="api", params=params, options=options, @@ -281,7 +273,6 @@ def cancel( "/v1/climate/orders/{order}/cancel".format( order=sanitize_id(order), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -307,7 +298,6 @@ async def cancel_async( "/v1/climate/orders/{order}/cancel".format( order=sanitize_id(order), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/climate/_product_service.py b/stripe/climate/_product_service.py index b0c4d230d..feed57549 100644 --- a/stripe/climate/_product_service.py +++ b/stripe/climate/_product_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/climate/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/climate/products", - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +88,6 @@ def retrieve( "/v1/climate/products/{product}".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +110,6 @@ async def retrieve_async( "/v1/climate/products/{product}".format( product=sanitize_id(product), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/climate/_supplier_service.py b/stripe/climate/_supplier_service.py index 6f4bf0b17..168e2221c 100644 --- a/stripe/climate/_supplier_service.py +++ b/stripe/climate/_supplier_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/climate/suppliers", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/climate/suppliers", - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +88,6 @@ def retrieve( "/v1/climate/suppliers/{supplier}".format( supplier=sanitize_id(supplier), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +110,6 @@ async def retrieve_async( "/v1/climate/suppliers/{supplier}".format( supplier=sanitize_id(supplier), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/entitlements/_active_entitlement_service.py b/stripe/entitlements/_active_entitlement_service.py index 862b41a6d..fedfb6111 100644 --- a/stripe/entitlements/_active_entitlement_service.py +++ b/stripe/entitlements/_active_entitlement_service.py @@ -51,7 +51,6 @@ def list( self._request( "get", "/v1/entitlements/active_entitlements", - api_mode="V1", base_address="api", params=params, options=options, @@ -71,7 +70,6 @@ async def list_async( await self._request_async( "get", "/v1/entitlements/active_entitlements", - api_mode="V1", base_address="api", params=params, options=options, @@ -94,7 +92,6 @@ def retrieve( "/v1/entitlements/active_entitlements/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -117,7 +114,6 @@ async def retrieve_async( "/v1/entitlements/active_entitlements/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/entitlements/_feature_service.py b/stripe/entitlements/_feature_service.py index dea34b0f2..b6e952283 100644 --- a/stripe/entitlements/_feature_service.py +++ b/stripe/entitlements/_feature_service.py @@ -91,7 +91,6 @@ def list( self._request( "get", "/v1/entitlements/features", - api_mode="V1", base_address="api", params=params, options=options, @@ -111,7 +110,6 @@ async def list_async( await self._request_async( "get", "/v1/entitlements/features", - api_mode="V1", base_address="api", params=params, options=options, @@ -131,7 +129,6 @@ def create( self._request( "post", "/v1/entitlements/features", - api_mode="V1", base_address="api", params=params, options=options, @@ -151,7 +148,6 @@ async def create_async( await self._request_async( "post", "/v1/entitlements/features", - api_mode="V1", base_address="api", params=params, options=options, @@ -172,7 +168,6 @@ def retrieve( self._request( "get", "/v1/entitlements/features/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -193,7 +188,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/entitlements/features/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -214,7 +208,6 @@ def update( self._request( "post", "/v1/entitlements/features/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -235,7 +228,6 @@ async def update_async( await self._request_async( "post", "/v1/entitlements/features/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/financial_connections/_account_owner_service.py b/stripe/financial_connections/_account_owner_service.py index 43422e8c8..8369b750c 100644 --- a/stripe/financial_connections/_account_owner_service.py +++ b/stripe/financial_connections/_account_owner_service.py @@ -48,7 +48,6 @@ def list( "/v1/financial_connections/accounts/{account}/owners".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -71,7 +70,6 @@ async def list_async( "/v1/financial_connections/accounts/{account}/owners".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/financial_connections/_account_service.py b/stripe/financial_connections/_account_service.py index 6ab7ac485..18fcd6dd6 100644 --- a/stripe/financial_connections/_account_service.py +++ b/stripe/financial_connections/_account_service.py @@ -108,7 +108,6 @@ def list( self._request( "get", "/v1/financial_connections/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -128,7 +127,6 @@ async def list_async( await self._request_async( "get", "/v1/financial_connections/accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -151,7 +149,6 @@ def retrieve( "/v1/financial_connections/accounts/{account}".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -174,7 +171,6 @@ async def retrieve_async( "/v1/financial_connections/accounts/{account}".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -197,7 +193,6 @@ def disconnect( "/v1/financial_connections/accounts/{account}/disconnect".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -220,7 +215,6 @@ async def disconnect_async( "/v1/financial_connections/accounts/{account}/disconnect".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -243,7 +237,6 @@ def refresh( "/v1/financial_connections/accounts/{account}/refresh".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -266,7 +259,6 @@ async def refresh_async( "/v1/financial_connections/accounts/{account}/refresh".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -289,7 +281,6 @@ def subscribe( "/v1/financial_connections/accounts/{account}/subscribe".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -312,7 +303,6 @@ async def subscribe_async( "/v1/financial_connections/accounts/{account}/subscribe".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -335,7 +325,6 @@ def unsubscribe( "/v1/financial_connections/accounts/{account}/unsubscribe".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -358,7 +347,6 @@ async def unsubscribe_async( "/v1/financial_connections/accounts/{account}/unsubscribe".format( account=sanitize_id(account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/financial_connections/_session_service.py b/stripe/financial_connections/_session_service.py index 3ca67b8bf..9295cb25f 100644 --- a/stripe/financial_connections/_session_service.py +++ b/stripe/financial_connections/_session_service.py @@ -97,7 +97,6 @@ def retrieve( "/v1/financial_connections/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -120,7 +119,6 @@ async def retrieve_async( "/v1/financial_connections/sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -140,7 +138,6 @@ def create( self._request( "post", "/v1/financial_connections/sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -160,7 +157,6 @@ async def create_async( await self._request_async( "post", "/v1/financial_connections/sessions", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/financial_connections/_transaction_service.py b/stripe/financial_connections/_transaction_service.py index 362ea579a..66683ae29 100644 --- a/stripe/financial_connections/_transaction_service.py +++ b/stripe/financial_connections/_transaction_service.py @@ -87,7 +87,6 @@ def list( self._request( "get", "/v1/financial_connections/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -107,7 +106,6 @@ async def list_async( await self._request_async( "get", "/v1/financial_connections/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -130,7 +128,6 @@ def retrieve( "/v1/financial_connections/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -153,7 +150,6 @@ async def retrieve_async( "/v1/financial_connections/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/forwarding/_request_service.py b/stripe/forwarding/_request_service.py index d8e1dffc5..b9049a234 100644 --- a/stripe/forwarding/_request_service.py +++ b/stripe/forwarding/_request_service.py @@ -115,7 +115,6 @@ def list( self._request( "get", "/v1/forwarding/requests", - api_mode="V1", base_address="api", params=params, options=options, @@ -135,7 +134,6 @@ async def list_async( await self._request_async( "get", "/v1/forwarding/requests", - api_mode="V1", base_address="api", params=params, options=options, @@ -155,7 +153,6 @@ def create( self._request( "post", "/v1/forwarding/requests", - api_mode="V1", base_address="api", params=params, options=options, @@ -175,7 +172,6 @@ async def create_async( await self._request_async( "post", "/v1/forwarding/requests", - api_mode="V1", base_address="api", params=params, options=options, @@ -196,7 +192,6 @@ def retrieve( self._request( "get", "/v1/forwarding/requests/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -217,7 +212,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/forwarding/requests/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/identity/_verification_report_service.py b/stripe/identity/_verification_report_service.py index 7554c54e0..95cbb8319 100644 --- a/stripe/identity/_verification_report_service.py +++ b/stripe/identity/_verification_report_service.py @@ -81,7 +81,6 @@ def list( self._request( "get", "/v1/identity/verification_reports", - api_mode="V1", base_address="api", params=params, options=options, @@ -101,7 +100,6 @@ async def list_async( await self._request_async( "get", "/v1/identity/verification_reports", - api_mode="V1", base_address="api", params=params, options=options, @@ -124,7 +122,6 @@ def retrieve( "/v1/identity/verification_reports/{report}".format( report=sanitize_id(report), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -147,7 +144,6 @@ async def retrieve_async( "/v1/identity/verification_reports/{report}".format( report=sanitize_id(report), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index 7cbe57bd0..341b795d6 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -234,7 +234,6 @@ def list( self._request( "get", "/v1/identity/verification_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -254,7 +253,6 @@ async def list_async( await self._request_async( "get", "/v1/identity/verification_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -280,7 +278,6 @@ def create( self._request( "post", "/v1/identity/verification_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -306,7 +303,6 @@ async def create_async( await self._request_async( "post", "/v1/identity/verification_sessions", - api_mode="V1", base_address="api", params=params, options=options, @@ -332,7 +328,6 @@ def retrieve( "/v1/identity/verification_sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -358,7 +353,6 @@ async def retrieve_async( "/v1/identity/verification_sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -384,7 +378,6 @@ def update( "/v1/identity/verification_sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -410,7 +403,6 @@ async def update_async( "/v1/identity/verification_sessions/{session}".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -435,7 +427,6 @@ def cancel( "/v1/identity/verification_sessions/{session}/cancel".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -460,7 +451,6 @@ async def cancel_async( "/v1/identity/verification_sessions/{session}/cancel".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -501,7 +491,6 @@ def redact( "/v1/identity/verification_sessions/{session}/redact".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -542,7 +531,6 @@ async def redact_async( "/v1/identity/verification_sessions/{session}/redact".format( session=sanitize_id(session), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_authorization_service.py b/stripe/issuing/_authorization_service.py index 20118487b..ad1c339c4 100644 --- a/stripe/issuing/_authorization_service.py +++ b/stripe/issuing/_authorization_service.py @@ -115,7 +115,6 @@ def list( self._request( "get", "/v1/issuing/authorizations", - api_mode="V1", base_address="api", params=params, options=options, @@ -135,7 +134,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/authorizations", - api_mode="V1", base_address="api", params=params, options=options, @@ -158,7 +156,6 @@ def retrieve( "/v1/issuing/authorizations/{authorization}".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -181,7 +178,6 @@ async def retrieve_async( "/v1/issuing/authorizations/{authorization}".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -204,7 +200,6 @@ def update( "/v1/issuing/authorizations/{authorization}".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -227,7 +222,6 @@ async def update_async( "/v1/issuing/authorizations/{authorization}".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +245,6 @@ def approve( "/v1/issuing/authorizations/{authorization}/approve".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -275,7 +268,6 @@ async def approve_async( "/v1/issuing/authorizations/{authorization}/approve".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -299,7 +291,6 @@ def decline( "/v1/issuing/authorizations/{authorization}/decline".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -323,7 +314,6 @@ async def decline_async( "/v1/issuing/authorizations/{authorization}/decline".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_card_service.py b/stripe/issuing/_card_service.py index d4b46520d..3a0dcb9ff 100644 --- a/stripe/issuing/_card_service.py +++ b/stripe/issuing/_card_service.py @@ -2240,7 +2240,6 @@ def list( self._request( "get", "/v1/issuing/cards", - api_mode="V1", base_address="api", params=params, options=options, @@ -2260,7 +2259,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/cards", - api_mode="V1", base_address="api", params=params, options=options, @@ -2278,7 +2276,6 @@ def create( self._request( "post", "/v1/issuing/cards", - api_mode="V1", base_address="api", params=params, options=options, @@ -2296,7 +2293,6 @@ async def create_async( await self._request_async( "post", "/v1/issuing/cards", - api_mode="V1", base_address="api", params=params, options=options, @@ -2317,7 +2313,6 @@ def retrieve( self._request( "get", "/v1/issuing/cards/{card}".format(card=sanitize_id(card)), - api_mode="V1", base_address="api", params=params, options=options, @@ -2338,7 +2333,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/issuing/cards/{card}".format(card=sanitize_id(card)), - api_mode="V1", base_address="api", params=params, options=options, @@ -2359,7 +2353,6 @@ def update( self._request( "post", "/v1/issuing/cards/{card}".format(card=sanitize_id(card)), - api_mode="V1", base_address="api", params=params, options=options, @@ -2380,7 +2373,6 @@ async def update_async( await self._request_async( "post", "/v1/issuing/cards/{card}".format(card=sanitize_id(card)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_cardholder_service.py b/stripe/issuing/_cardholder_service.py index 02edd720b..34f4c468d 100644 --- a/stripe/issuing/_cardholder_service.py +++ b/stripe/issuing/_cardholder_service.py @@ -2321,7 +2321,6 @@ def list( self._request( "get", "/v1/issuing/cardholders", - api_mode="V1", base_address="api", params=params, options=options, @@ -2341,7 +2340,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/cardholders", - api_mode="V1", base_address="api", params=params, options=options, @@ -2361,7 +2359,6 @@ def create( self._request( "post", "/v1/issuing/cardholders", - api_mode="V1", base_address="api", params=params, options=options, @@ -2381,7 +2378,6 @@ async def create_async( await self._request_async( "post", "/v1/issuing/cardholders", - api_mode="V1", base_address="api", params=params, options=options, @@ -2404,7 +2400,6 @@ def retrieve( "/v1/issuing/cardholders/{cardholder}".format( cardholder=sanitize_id(cardholder), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2427,7 +2422,6 @@ async def retrieve_async( "/v1/issuing/cardholders/{cardholder}".format( cardholder=sanitize_id(cardholder), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2450,7 +2444,6 @@ def update( "/v1/issuing/cardholders/{cardholder}".format( cardholder=sanitize_id(cardholder), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -2473,7 +2466,6 @@ async def update_async( "/v1/issuing/cardholders/{cardholder}".format( cardholder=sanitize_id(cardholder), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_dispute_service.py b/stripe/issuing/_dispute_service.py index 66492a871..fc7347bf0 100644 --- a/stripe/issuing/_dispute_service.py +++ b/stripe/issuing/_dispute_service.py @@ -641,7 +641,6 @@ def list( self._request( "get", "/v1/issuing/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -661,7 +660,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -681,7 +679,6 @@ def create( self._request( "post", "/v1/issuing/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -701,7 +698,6 @@ async def create_async( await self._request_async( "post", "/v1/issuing/disputes", - api_mode="V1", base_address="api", params=params, options=options, @@ -724,7 +720,6 @@ def retrieve( "/v1/issuing/disputes/{dispute}".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -747,7 +742,6 @@ async def retrieve_async( "/v1/issuing/disputes/{dispute}".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -770,7 +764,6 @@ def update( "/v1/issuing/disputes/{dispute}".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -793,7 +786,6 @@ async def update_async( "/v1/issuing/disputes/{dispute}".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -816,7 +808,6 @@ def submit( "/v1/issuing/disputes/{dispute}/submit".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -839,7 +830,6 @@ async def submit_async( "/v1/issuing/disputes/{dispute}/submit".format( dispute=sanitize_id(dispute), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_personalization_design_service.py b/stripe/issuing/_personalization_design_service.py index 259746c88..a32c09090 100644 --- a/stripe/issuing/_personalization_design_service.py +++ b/stripe/issuing/_personalization_design_service.py @@ -205,7 +205,6 @@ def list( self._request( "get", "/v1/issuing/personalization_designs", - api_mode="V1", base_address="api", params=params, options=options, @@ -225,7 +224,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/personalization_designs", - api_mode="V1", base_address="api", params=params, options=options, @@ -245,7 +243,6 @@ def create( self._request( "post", "/v1/issuing/personalization_designs", - api_mode="V1", base_address="api", params=params, options=options, @@ -265,7 +262,6 @@ async def create_async( await self._request_async( "post", "/v1/issuing/personalization_designs", - api_mode="V1", base_address="api", params=params, options=options, @@ -288,7 +284,6 @@ def retrieve( "/v1/issuing/personalization_designs/{personalization_design}".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -311,7 +306,6 @@ async def retrieve_async( "/v1/issuing/personalization_designs/{personalization_design}".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -334,7 +328,6 @@ def update( "/v1/issuing/personalization_designs/{personalization_design}".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -357,7 +350,6 @@ async def update_async( "/v1/issuing/personalization_designs/{personalization_design}".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_physical_bundle_service.py b/stripe/issuing/_physical_bundle_service.py index 39722924d..3c9f367ae 100644 --- a/stripe/issuing/_physical_bundle_service.py +++ b/stripe/issuing/_physical_bundle_service.py @@ -55,7 +55,6 @@ def list( self._request( "get", "/v1/issuing/physical_bundles", - api_mode="V1", base_address="api", params=params, options=options, @@ -75,7 +74,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/physical_bundles", - api_mode="V1", base_address="api", params=params, options=options, @@ -98,7 +96,6 @@ def retrieve( "/v1/issuing/physical_bundles/{physical_bundle}".format( physical_bundle=sanitize_id(physical_bundle), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -121,7 +118,6 @@ async def retrieve_async( "/v1/issuing/physical_bundles/{physical_bundle}".format( physical_bundle=sanitize_id(physical_bundle), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_token_service.py b/stripe/issuing/_token_service.py index 6a6b99d20..9bb20e872 100644 --- a/stripe/issuing/_token_service.py +++ b/stripe/issuing/_token_service.py @@ -87,7 +87,6 @@ def list( self._request( "get", "/v1/issuing/tokens", - api_mode="V1", base_address="api", params=params, options=options, @@ -105,7 +104,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/tokens", - api_mode="V1", base_address="api", params=params, options=options, @@ -126,7 +124,6 @@ def retrieve( self._request( "get", "/v1/issuing/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, @@ -147,7 +144,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/issuing/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, @@ -168,7 +164,6 @@ def update( self._request( "post", "/v1/issuing/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, @@ -189,7 +184,6 @@ async def update_async( await self._request_async( "post", "/v1/issuing/tokens/{token}".format(token=sanitize_id(token)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/issuing/_transaction_service.py b/stripe/issuing/_transaction_service.py index 178c73832..f61d4622a 100644 --- a/stripe/issuing/_transaction_service.py +++ b/stripe/issuing/_transaction_service.py @@ -91,7 +91,6 @@ def list( self._request( "get", "/v1/issuing/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -111,7 +110,6 @@ async def list_async( await self._request_async( "get", "/v1/issuing/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -134,7 +132,6 @@ def retrieve( "/v1/issuing/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -157,7 +154,6 @@ async def retrieve_async( "/v1/issuing/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -180,7 +176,6 @@ def update( "/v1/issuing/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -203,7 +198,6 @@ async def update_async( "/v1/issuing/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/radar/_early_fraud_warning_service.py b/stripe/radar/_early_fraud_warning_service.py index 2118f15cb..552c95425 100644 --- a/stripe/radar/_early_fraud_warning_service.py +++ b/stripe/radar/_early_fraud_warning_service.py @@ -77,7 +77,6 @@ def list( self._request( "get", "/v1/radar/early_fraud_warnings", - api_mode="V1", base_address="api", params=params, options=options, @@ -97,7 +96,6 @@ async def list_async( await self._request_async( "get", "/v1/radar/early_fraud_warnings", - api_mode="V1", base_address="api", params=params, options=options, @@ -122,7 +120,6 @@ def retrieve( "/v1/radar/early_fraud_warnings/{early_fraud_warning}".format( early_fraud_warning=sanitize_id(early_fraud_warning), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -147,7 +144,6 @@ async def retrieve_async( "/v1/radar/early_fraud_warnings/{early_fraud_warning}".format( early_fraud_warning=sanitize_id(early_fraud_warning), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/radar/_value_list_item_service.py b/stripe/radar/_value_list_item_service.py index 60c54fec2..247d21d3e 100644 --- a/stripe/radar/_value_list_item_service.py +++ b/stripe/radar/_value_list_item_service.py @@ -97,7 +97,6 @@ def delete( "/v1/radar/value_list_items/{item}".format( item=sanitize_id(item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -120,7 +119,6 @@ async def delete_async( "/v1/radar/value_list_items/{item}".format( item=sanitize_id(item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -143,7 +141,6 @@ def retrieve( "/v1/radar/value_list_items/{item}".format( item=sanitize_id(item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -166,7 +163,6 @@ async def retrieve_async( "/v1/radar/value_list_items/{item}".format( item=sanitize_id(item), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -186,7 +182,6 @@ def list( self._request( "get", "/v1/radar/value_list_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -206,7 +201,6 @@ async def list_async( await self._request_async( "get", "/v1/radar/value_list_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -226,7 +220,6 @@ def create( self._request( "post", "/v1/radar/value_list_items", - api_mode="V1", base_address="api", params=params, options=options, @@ -246,7 +239,6 @@ async def create_async( await self._request_async( "post", "/v1/radar/value_list_items", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/radar/_value_list_service.py b/stripe/radar/_value_list_service.py index f0e9e330d..ed270a34f 100644 --- a/stripe/radar/_value_list_service.py +++ b/stripe/radar/_value_list_service.py @@ -136,7 +136,6 @@ def delete( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -159,7 +158,6 @@ async def delete_async( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -182,7 +180,6 @@ def retrieve( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -205,7 +202,6 @@ async def retrieve_async( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -228,7 +224,6 @@ def update( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -251,7 +246,6 @@ async def update_async( "/v1/radar/value_lists/{value_list}".format( value_list=sanitize_id(value_list), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -271,7 +265,6 @@ def list( self._request( "get", "/v1/radar/value_lists", - api_mode="V1", base_address="api", params=params, options=options, @@ -291,7 +284,6 @@ async def list_async( await self._request_async( "get", "/v1/radar/value_lists", - api_mode="V1", base_address="api", params=params, options=options, @@ -311,7 +303,6 @@ def create( self._request( "post", "/v1/radar/value_lists", - api_mode="V1", base_address="api", params=params, options=options, @@ -331,7 +322,6 @@ async def create_async( await self._request_async( "post", "/v1/radar/value_lists", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/reporting/_report_run_service.py b/stripe/reporting/_report_run_service.py index 9e8c86dff..cc4505382 100644 --- a/stripe/reporting/_report_run_service.py +++ b/stripe/reporting/_report_run_service.py @@ -758,7 +758,6 @@ def list( self._request( "get", "/v1/reporting/report_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -778,7 +777,6 @@ async def list_async( await self._request_async( "get", "/v1/reporting/report_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -798,7 +796,6 @@ def create( self._request( "post", "/v1/reporting/report_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -818,7 +815,6 @@ async def create_async( await self._request_async( "post", "/v1/reporting/report_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -841,7 +837,6 @@ def retrieve( "/v1/reporting/report_runs/{report_run}".format( report_run=sanitize_id(report_run), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -864,7 +859,6 @@ async def retrieve_async( "/v1/reporting/report_runs/{report_run}".format( report_run=sanitize_id(report_run), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/reporting/_report_type_service.py b/stripe/reporting/_report_type_service.py index e50f78037..9f52e3be5 100644 --- a/stripe/reporting/_report_type_service.py +++ b/stripe/reporting/_report_type_service.py @@ -35,7 +35,6 @@ def list( self._request( "get", "/v1/reporting/report_types", - api_mode="V1", base_address="api", params=params, options=options, @@ -55,7 +54,6 @@ async def list_async( await self._request_async( "get", "/v1/reporting/report_types", - api_mode="V1", base_address="api", params=params, options=options, @@ -78,7 +76,6 @@ def retrieve( "/v1/reporting/report_types/{report_type}".format( report_type=sanitize_id(report_type), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -101,7 +98,6 @@ async def retrieve_async( "/v1/reporting/report_types/{report_type}".format( report_type=sanitize_id(report_type), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/sigma/_scheduled_query_run_service.py b/stripe/sigma/_scheduled_query_run_service.py index 55bec997f..4ea7ec6dd 100644 --- a/stripe/sigma/_scheduled_query_run_service.py +++ b/stripe/sigma/_scheduled_query_run_service.py @@ -47,7 +47,6 @@ def list( self._request( "get", "/v1/sigma/scheduled_query_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( await self._request_async( "get", "/v1/sigma/scheduled_query_runs", - api_mode="V1", base_address="api", params=params, options=options, @@ -90,7 +88,6 @@ def retrieve( "/v1/sigma/scheduled_query_runs/{scheduled_query_run}".format( scheduled_query_run=sanitize_id(scheduled_query_run), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +110,6 @@ async def retrieve_async( "/v1/sigma/scheduled_query_runs/{scheduled_query_run}".format( scheduled_query_run=sanitize_id(scheduled_query_run), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_calculation_line_item_service.py b/stripe/tax/_calculation_line_item_service.py index 08651f8eb..a679bb990 100644 --- a/stripe/tax/_calculation_line_item_service.py +++ b/stripe/tax/_calculation_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/tax/calculations/{calculation}/line_items".format( calculation=sanitize_id(calculation), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/tax/calculations/{calculation}/line_items".format( calculation=sanitize_id(calculation), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index ced36501f..c1b68be72 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -293,7 +293,6 @@ def retrieve( "/v1/tax/calculations/{calculation}".format( calculation=sanitize_id(calculation), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -316,7 +315,6 @@ async def retrieve_async( "/v1/tax/calculations/{calculation}".format( calculation=sanitize_id(calculation), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -336,7 +334,6 @@ def create( self._request( "post", "/v1/tax/calculations", - api_mode="V1", base_address="api", params=params, options=options, @@ -356,7 +353,6 @@ async def create_async( await self._request_async( "post", "/v1/tax/calculations", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index 538f57e8f..1f9b4ba93 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -1023,7 +1023,6 @@ def list( self._request( "get", "/v1/tax/registrations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1043,7 +1042,6 @@ async def list_async( await self._request_async( "get", "/v1/tax/registrations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1063,7 +1061,6 @@ def create( self._request( "post", "/v1/tax/registrations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1083,7 +1080,6 @@ async def create_async( await self._request_async( "post", "/v1/tax/registrations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1104,7 +1100,6 @@ def retrieve( self._request( "get", "/v1/tax/registrations/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -1125,7 +1120,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/tax/registrations/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -1148,7 +1142,6 @@ def update( self._request( "post", "/v1/tax/registrations/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -1171,7 +1164,6 @@ async def update_async( await self._request_async( "post", "/v1/tax/registrations/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_settings_service.py b/stripe/tax/_settings_service.py index 63903ccff..84e04a55c 100644 --- a/stripe/tax/_settings_service.py +++ b/stripe/tax/_settings_service.py @@ -85,7 +85,6 @@ def retrieve( self._request( "get", "/v1/tax/settings", - api_mode="V1", base_address="api", params=params, options=options, @@ -105,7 +104,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/tax/settings", - api_mode="V1", base_address="api", params=params, options=options, @@ -125,7 +123,6 @@ def update( self._request( "post", "/v1/tax/settings", - api_mode="V1", base_address="api", params=params, options=options, @@ -145,7 +142,6 @@ async def update_async( await self._request_async( "post", "/v1/tax/settings", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_transaction_line_item_service.py b/stripe/tax/_transaction_line_item_service.py index 2a50b2fd5..be9927b8d 100644 --- a/stripe/tax/_transaction_line_item_service.py +++ b/stripe/tax/_transaction_line_item_service.py @@ -44,7 +44,6 @@ def list( "/v1/tax/transactions/{transaction}/line_items".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -67,7 +66,6 @@ async def list_async( "/v1/tax/transactions/{transaction}/line_items".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/tax/_transaction_service.py b/stripe/tax/_transaction_service.py index d76151cb0..3ccc0a339 100644 --- a/stripe/tax/_transaction_service.py +++ b/stripe/tax/_transaction_service.py @@ -134,7 +134,6 @@ def retrieve( "/v1/tax/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -157,7 +156,6 @@ async def retrieve_async( "/v1/tax/transactions/{transaction}".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -177,7 +175,6 @@ def create_from_calculation( self._request( "post", "/v1/tax/transactions/create_from_calculation", - api_mode="V1", base_address="api", params=params, options=options, @@ -197,7 +194,6 @@ async def create_from_calculation_async( await self._request_async( "post", "/v1/tax/transactions/create_from_calculation", - api_mode="V1", base_address="api", params=params, options=options, @@ -217,7 +213,6 @@ def create_reversal( self._request( "post", "/v1/tax/transactions/create_reversal", - api_mode="V1", base_address="api", params=params, options=options, @@ -237,7 +232,6 @@ async def create_reversal_async( await self._request_async( "post", "/v1/tax/transactions/create_reversal", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index 002f55fb5..a47d12507 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -723,7 +723,6 @@ def delete( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -746,7 +745,6 @@ async def delete_async( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -769,7 +767,6 @@ def retrieve( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -792,7 +789,6 @@ async def retrieve_async( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -815,7 +811,6 @@ def update( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -838,7 +833,6 @@ async def update_async( "/v1/terminal/configurations/{configuration}".format( configuration=sanitize_id(configuration), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -858,7 +852,6 @@ def list( self._request( "get", "/v1/terminal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -878,7 +871,6 @@ async def list_async( await self._request_async( "get", "/v1/terminal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -898,7 +890,6 @@ def create( self._request( "post", "/v1/terminal/configurations", - api_mode="V1", base_address="api", params=params, options=options, @@ -918,7 +909,6 @@ async def create_async( await self._request_async( "post", "/v1/terminal/configurations", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/terminal/_connection_token_service.py b/stripe/terminal/_connection_token_service.py index 536ca8795..0a2db379c 100644 --- a/stripe/terminal/_connection_token_service.py +++ b/stripe/terminal/_connection_token_service.py @@ -31,7 +31,6 @@ def create( self._request( "post", "/v1/terminal/connection_tokens", - api_mode="V1", base_address="api", params=params, options=options, @@ -51,7 +50,6 @@ async def create_async( await self._request_async( "post", "/v1/terminal/connection_tokens", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/terminal/_location_service.py b/stripe/terminal/_location_service.py index 3da89f547..427c395f7 100644 --- a/stripe/terminal/_location_service.py +++ b/stripe/terminal/_location_service.py @@ -149,7 +149,6 @@ def delete( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -172,7 +171,6 @@ async def delete_async( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -195,7 +193,6 @@ def retrieve( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -218,7 +215,6 @@ async def retrieve_async( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -241,7 +237,6 @@ def update( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -264,7 +259,6 @@ async def update_async( "/v1/terminal/locations/{location}".format( location=sanitize_id(location), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -284,7 +278,6 @@ def list( self._request( "get", "/v1/terminal/locations", - api_mode="V1", base_address="api", params=params, options=options, @@ -304,7 +297,6 @@ async def list_async( await self._request_async( "get", "/v1/terminal/locations", - api_mode="V1", base_address="api", params=params, options=options, @@ -325,7 +317,6 @@ def create( self._request( "post", "/v1/terminal/locations", - api_mode="V1", base_address="api", params=params, options=options, @@ -346,7 +337,6 @@ async def create_async( await self._request_async( "post", "/v1/terminal/locations", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 89aec481e..7b8739b94 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -274,7 +274,6 @@ def delete( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -297,7 +296,6 @@ async def delete_async( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -320,7 +318,6 @@ def retrieve( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -343,7 +340,6 @@ async def retrieve_async( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -366,7 +362,6 @@ def update( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -389,7 +384,6 @@ async def update_async( "/v1/terminal/readers/{reader}".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -409,7 +403,6 @@ def list( self._request( "get", "/v1/terminal/readers", - api_mode="V1", base_address="api", params=params, options=options, @@ -429,7 +422,6 @@ async def list_async( await self._request_async( "get", "/v1/terminal/readers", - api_mode="V1", base_address="api", params=params, options=options, @@ -449,7 +441,6 @@ def create( self._request( "post", "/v1/terminal/readers", - api_mode="V1", base_address="api", params=params, options=options, @@ -469,7 +460,6 @@ async def create_async( await self._request_async( "post", "/v1/terminal/readers", - api_mode="V1", base_address="api", params=params, options=options, @@ -492,7 +482,6 @@ def cancel_action( "/v1/terminal/readers/{reader}/cancel_action".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -515,7 +504,6 @@ async def cancel_action_async( "/v1/terminal/readers/{reader}/cancel_action".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -538,7 +526,6 @@ def process_payment_intent( "/v1/terminal/readers/{reader}/process_payment_intent".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -561,7 +548,6 @@ async def process_payment_intent_async( "/v1/terminal/readers/{reader}/process_payment_intent".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -584,7 +570,6 @@ def process_setup_intent( "/v1/terminal/readers/{reader}/process_setup_intent".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -607,7 +592,6 @@ async def process_setup_intent_async( "/v1/terminal/readers/{reader}/process_setup_intent".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -630,7 +614,6 @@ def refund_payment( "/v1/terminal/readers/{reader}/refund_payment".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -653,7 +636,6 @@ async def refund_payment_async( "/v1/terminal/readers/{reader}/refund_payment".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -676,7 +658,6 @@ def set_reader_display( "/v1/terminal/readers/{reader}/set_reader_display".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -699,7 +680,6 @@ async def set_reader_display_async( "/v1/terminal/readers/{reader}/set_reader_display".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 6d3e3473f..c52789f0a 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -731,7 +731,6 @@ def create( self._request( "post", "/v1/test_helpers/confirmation_tokens", - api_mode="V1", base_address="api", params=params, options=options, @@ -751,7 +750,6 @@ async def create_async( await self._request_async( "post", "/v1/test_helpers/confirmation_tokens", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/_customer_service.py b/stripe/test_helpers/_customer_service.py index f9870538b..fc4707179 100644 --- a/stripe/test_helpers/_customer_service.py +++ b/stripe/test_helpers/_customer_service.py @@ -45,7 +45,6 @@ def fund_cash_balance( "/v1/test_helpers/customers/{customer}/fund_cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -68,7 +67,6 @@ async def fund_cash_balance_async( "/v1/test_helpers/customers/{customer}/fund_cash_balance".format( customer=sanitize_id(customer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/_refund_service.py b/stripe/test_helpers/_refund_service.py index 27d0a885f..0e4d2dd1a 100644 --- a/stripe/test_helpers/_refund_service.py +++ b/stripe/test_helpers/_refund_service.py @@ -31,7 +31,6 @@ def expire( "/v1/test_helpers/refunds/{refund}/expire".format( refund=sanitize_id(refund), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -54,7 +53,6 @@ async def expire_async( "/v1/test_helpers/refunds/{refund}/expire".format( refund=sanitize_id(refund), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/_test_clock_service.py b/stripe/test_helpers/_test_clock_service.py index 72e98b2dd..0584c0a4d 100644 --- a/stripe/test_helpers/_test_clock_service.py +++ b/stripe/test_helpers/_test_clock_service.py @@ -77,7 +77,6 @@ def delete( "/v1/test_helpers/test_clocks/{test_clock}".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -100,7 +99,6 @@ async def delete_async( "/v1/test_helpers/test_clocks/{test_clock}".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -123,7 +121,6 @@ def retrieve( "/v1/test_helpers/test_clocks/{test_clock}".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -146,7 +143,6 @@ async def retrieve_async( "/v1/test_helpers/test_clocks/{test_clock}".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -166,7 +162,6 @@ def list( self._request( "get", "/v1/test_helpers/test_clocks", - api_mode="V1", base_address="api", params=params, options=options, @@ -186,7 +181,6 @@ async def list_async( await self._request_async( "get", "/v1/test_helpers/test_clocks", - api_mode="V1", base_address="api", params=params, options=options, @@ -206,7 +200,6 @@ def create( self._request( "post", "/v1/test_helpers/test_clocks", - api_mode="V1", base_address="api", params=params, options=options, @@ -226,7 +219,6 @@ async def create_async( await self._request_async( "post", "/v1/test_helpers/test_clocks", - api_mode="V1", base_address="api", params=params, options=options, @@ -249,7 +241,6 @@ def advance( "/v1/test_helpers/test_clocks/{test_clock}/advance".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -272,7 +263,6 @@ async def advance_async( "/v1/test_helpers/test_clocks/{test_clock}/advance".format( test_clock=sanitize_id(test_clock), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/issuing/_authorization_service.py b/stripe/test_helpers/issuing/_authorization_service.py index 7279e4d19..ff3ed6b0e 100644 --- a/stripe/test_helpers/issuing/_authorization_service.py +++ b/stripe/test_helpers/issuing/_authorization_service.py @@ -1068,7 +1068,6 @@ def create( self._request( "post", "/v1/test_helpers/issuing/authorizations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1088,7 +1087,6 @@ async def create_async( await self._request_async( "post", "/v1/test_helpers/issuing/authorizations", - api_mode="V1", base_address="api", params=params, options=options, @@ -1111,7 +1109,6 @@ def capture( "/v1/test_helpers/issuing/authorizations/{authorization}/capture".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1134,7 +1131,6 @@ async def capture_async( "/v1/test_helpers/issuing/authorizations/{authorization}/capture".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1157,7 +1153,6 @@ def expire( "/v1/test_helpers/issuing/authorizations/{authorization}/expire".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1180,7 +1175,6 @@ async def expire_async( "/v1/test_helpers/issuing/authorizations/{authorization}/expire".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1203,7 +1197,6 @@ def finalize_amount( "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1226,7 +1219,6 @@ async def finalize_amount_async( "/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1249,7 +1241,6 @@ def increment( "/v1/test_helpers/issuing/authorizations/{authorization}/increment".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1272,7 +1263,6 @@ async def increment_async( "/v1/test_helpers/issuing/authorizations/{authorization}/increment".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1295,7 +1285,6 @@ def reverse( "/v1/test_helpers/issuing/authorizations/{authorization}/reverse".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1318,7 +1307,6 @@ async def reverse_async( "/v1/test_helpers/issuing/authorizations/{authorization}/reverse".format( authorization=sanitize_id(authorization), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/issuing/_card_service.py b/stripe/test_helpers/issuing/_card_service.py index 51b742f65..5add490c4 100644 --- a/stripe/test_helpers/issuing/_card_service.py +++ b/stripe/test_helpers/issuing/_card_service.py @@ -49,7 +49,6 @@ def deliver_card( "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -72,7 +71,6 @@ async def deliver_card_async( "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -95,7 +93,6 @@ def fail_card( "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -118,7 +115,6 @@ async def fail_card_async( "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -141,7 +137,6 @@ def return_card( "/v1/test_helpers/issuing/cards/{card}/shipping/return".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -164,7 +159,6 @@ async def return_card_async( "/v1/test_helpers/issuing/cards/{card}/shipping/return".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -187,7 +181,6 @@ def ship_card( "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -210,7 +203,6 @@ async def ship_card_async( "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format( card=sanitize_id(card), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/issuing/_personalization_design_service.py b/stripe/test_helpers/issuing/_personalization_design_service.py index 671952b57..e430d007a 100644 --- a/stripe/test_helpers/issuing/_personalization_design_service.py +++ b/stripe/test_helpers/issuing/_personalization_design_service.py @@ -84,7 +84,6 @@ def activate( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -107,7 +106,6 @@ async def activate_async( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -130,7 +128,6 @@ def deactivate( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -153,7 +150,6 @@ async def deactivate_async( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -176,7 +172,6 @@ def reject( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -199,7 +194,6 @@ async def reject_async( "/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format( personalization_design=sanitize_id(personalization_design), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/issuing/_transaction_service.py b/stripe/test_helpers/issuing/_transaction_service.py index a585ce908..bd92e04b7 100644 --- a/stripe/test_helpers/issuing/_transaction_service.py +++ b/stripe/test_helpers/issuing/_transaction_service.py @@ -1267,7 +1267,6 @@ def refund( "/v1/test_helpers/issuing/transactions/{transaction}/refund".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1290,7 +1289,6 @@ async def refund_async( "/v1/test_helpers/issuing/transactions/{transaction}/refund".format( transaction=sanitize_id(transaction), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -1310,7 +1308,6 @@ def create_force_capture( self._request( "post", "/v1/test_helpers/issuing/transactions/create_force_capture", - api_mode="V1", base_address="api", params=params, options=options, @@ -1330,7 +1327,6 @@ async def create_force_capture_async( await self._request_async( "post", "/v1/test_helpers/issuing/transactions/create_force_capture", - api_mode="V1", base_address="api", params=params, options=options, @@ -1350,7 +1346,6 @@ def create_unlinked_refund( self._request( "post", "/v1/test_helpers/issuing/transactions/create_unlinked_refund", - api_mode="V1", base_address="api", params=params, options=options, @@ -1370,7 +1365,6 @@ async def create_unlinked_refund_async( await self._request_async( "post", "/v1/test_helpers/issuing/transactions/create_unlinked_refund", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/terminal/_reader_service.py b/stripe/test_helpers/terminal/_reader_service.py index 04c64468a..b438dd213 100644 --- a/stripe/test_helpers/terminal/_reader_service.py +++ b/stripe/test_helpers/terminal/_reader_service.py @@ -63,7 +63,6 @@ def present_payment_method( "/v1/test_helpers/terminal/readers/{reader}/present_payment_method".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -86,7 +85,6 @@ async def present_payment_method_async( "/v1/test_helpers/terminal/readers/{reader}/present_payment_method".format( reader=sanitize_id(reader), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/treasury/_inbound_transfer_service.py b/stripe/test_helpers/treasury/_inbound_transfer_service.py index 16b16359d..60dcd7b90 100644 --- a/stripe/test_helpers/treasury/_inbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_inbound_transfer_service.py @@ -71,7 +71,6 @@ def fail( "/v1/test_helpers/treasury/inbound_transfers/{id}/fail".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -94,7 +93,6 @@ async def fail_async( "/v1/test_helpers/treasury/inbound_transfers/{id}/fail".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -117,7 +115,6 @@ def return_inbound_transfer( "/v1/test_helpers/treasury/inbound_transfers/{id}/return".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -140,7 +137,6 @@ async def return_inbound_transfer_async( "/v1/test_helpers/treasury/inbound_transfers/{id}/return".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -163,7 +159,6 @@ def succeed( "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -186,7 +181,6 @@ async def succeed_async( "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index 8299fc12a..33aa4fff5 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -116,7 +116,6 @@ def update( "/v1/test_helpers/treasury/outbound_payments/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -139,7 +138,6 @@ async def update_async( "/v1/test_helpers/treasury/outbound_payments/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -162,7 +160,6 @@ def fail( "/v1/test_helpers/treasury/outbound_payments/{id}/fail".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -185,7 +182,6 @@ async def fail_async( "/v1/test_helpers/treasury/outbound_payments/{id}/fail".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -208,7 +204,6 @@ def post( "/v1/test_helpers/treasury/outbound_payments/{id}/post".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +226,6 @@ async def post_async( "/v1/test_helpers/treasury/outbound_payments/{id}/post".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -254,7 +248,6 @@ def return_outbound_payment( "/v1/test_helpers/treasury/outbound_payments/{id}/return".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -277,7 +270,6 @@ async def return_outbound_payment_async( "/v1/test_helpers/treasury/outbound_payments/{id}/return".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index 185038a5b..b6e48ccf6 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -116,7 +116,6 @@ def update( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -139,7 +138,6 @@ async def update_async( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -162,7 +160,6 @@ def fail( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -185,7 +182,6 @@ async def fail_async( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -208,7 +204,6 @@ def post( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -231,7 +226,6 @@ async def post_async( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -254,7 +248,6 @@ def return_outbound_transfer( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -277,7 +270,6 @@ async def return_outbound_transfer_async( "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/treasury/_received_credit_service.py b/stripe/test_helpers/treasury/_received_credit_service.py index 14ca527c8..2a7033187 100644 --- a/stripe/test_helpers/treasury/_received_credit_service.py +++ b/stripe/test_helpers/treasury/_received_credit_service.py @@ -79,7 +79,6 @@ def create( self._request( "post", "/v1/test_helpers/treasury/received_credits", - api_mode="V1", base_address="api", params=params, options=options, @@ -99,7 +98,6 @@ async def create_async( await self._request_async( "post", "/v1/test_helpers/treasury/received_credits", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/test_helpers/treasury/_received_debit_service.py b/stripe/test_helpers/treasury/_received_debit_service.py index 2b0f761cc..918b269e3 100644 --- a/stripe/test_helpers/treasury/_received_debit_service.py +++ b/stripe/test_helpers/treasury/_received_debit_service.py @@ -79,7 +79,6 @@ def create( self._request( "post", "/v1/test_helpers/treasury/received_debits", - api_mode="V1", base_address="api", params=params, options=options, @@ -99,7 +98,6 @@ async def create_async( await self._request_async( "post", "/v1/test_helpers/treasury/received_debits", - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_credit_reversal_service.py b/stripe/treasury/_credit_reversal_service.py index 3ae920b0f..316da77b6 100644 --- a/stripe/treasury/_credit_reversal_service.py +++ b/stripe/treasury/_credit_reversal_service.py @@ -73,7 +73,6 @@ def list( self._request( "get", "/v1/treasury/credit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -93,7 +92,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/credit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -113,7 +111,6 @@ def create( self._request( "post", "/v1/treasury/credit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -133,7 +130,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/credit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -156,7 +152,6 @@ def retrieve( "/v1/treasury/credit_reversals/{credit_reversal}".format( credit_reversal=sanitize_id(credit_reversal), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -179,7 +174,6 @@ async def retrieve_async( "/v1/treasury/credit_reversals/{credit_reversal}".format( credit_reversal=sanitize_id(credit_reversal), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_debit_reversal_service.py b/stripe/treasury/_debit_reversal_service.py index b8f54471b..a5037bf11 100644 --- a/stripe/treasury/_debit_reversal_service.py +++ b/stripe/treasury/_debit_reversal_service.py @@ -77,7 +77,6 @@ def list( self._request( "get", "/v1/treasury/debit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -97,7 +96,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/debit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -117,7 +115,6 @@ def create( self._request( "post", "/v1/treasury/debit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +134,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/debit_reversals", - api_mode="V1", base_address="api", params=params, options=options, @@ -160,7 +156,6 @@ def retrieve( "/v1/treasury/debit_reversals/{debit_reversal}".format( debit_reversal=sanitize_id(debit_reversal), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -183,7 +178,6 @@ async def retrieve_async( "/v1/treasury/debit_reversals/{debit_reversal}".format( debit_reversal=sanitize_id(debit_reversal), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_financial_account_features_service.py b/stripe/treasury/_financial_account_features_service.py index a165eb7f7..95ffff587 100644 --- a/stripe/treasury/_financial_account_features_service.py +++ b/stripe/treasury/_financial_account_features_service.py @@ -179,7 +179,6 @@ def update( "/v1/treasury/financial_accounts/{financial_account}/features".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -202,7 +201,6 @@ async def update_async( "/v1/treasury/financial_accounts/{financial_account}/features".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -225,7 +223,6 @@ def retrieve( "/v1/treasury/financial_accounts/{financial_account}/features".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -248,7 +245,6 @@ async def retrieve_async( "/v1/treasury/financial_accounts/{financial_account}/features".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_financial_account_service.py b/stripe/treasury/_financial_account_service.py index c61f2e46e..87aa3ae03 100644 --- a/stripe/treasury/_financial_account_service.py +++ b/stripe/treasury/_financial_account_service.py @@ -424,7 +424,6 @@ def list( self._request( "get", "/v1/treasury/financial_accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -444,7 +443,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/financial_accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -464,7 +462,6 @@ def create( self._request( "post", "/v1/treasury/financial_accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -484,7 +481,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/financial_accounts", - api_mode="V1", base_address="api", params=params, options=options, @@ -507,7 +503,6 @@ def retrieve( "/v1/treasury/financial_accounts/{financial_account}".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -530,7 +525,6 @@ async def retrieve_async( "/v1/treasury/financial_accounts/{financial_account}".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -553,7 +547,6 @@ def update( "/v1/treasury/financial_accounts/{financial_account}".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -576,7 +569,6 @@ async def update_async( "/v1/treasury/financial_accounts/{financial_account}".format( financial_account=sanitize_id(financial_account), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_inbound_transfer_service.py b/stripe/treasury/_inbound_transfer_service.py index 40c7114b3..cf4e166e2 100644 --- a/stripe/treasury/_inbound_transfer_service.py +++ b/stripe/treasury/_inbound_transfer_service.py @@ -97,7 +97,6 @@ def list( self._request( "get", "/v1/treasury/inbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -117,7 +116,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/inbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +135,6 @@ def create( self._request( "post", "/v1/treasury/inbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -157,7 +154,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/inbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -180,7 +176,6 @@ def retrieve( "/v1/treasury/inbound_transfers/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -203,7 +198,6 @@ async def retrieve_async( "/v1/treasury/inbound_transfers/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -226,7 +220,6 @@ def cancel( "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel".format( inbound_transfer=sanitize_id(inbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -249,7 +242,6 @@ async def cancel_async( "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel".format( inbound_transfer=sanitize_id(inbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_outbound_payment_service.py b/stripe/treasury/_outbound_payment_service.py index 2a22eb7e2..45305a619 100644 --- a/stripe/treasury/_outbound_payment_service.py +++ b/stripe/treasury/_outbound_payment_service.py @@ -265,7 +265,6 @@ def list( self._request( "get", "/v1/treasury/outbound_payments", - api_mode="V1", base_address="api", params=params, options=options, @@ -285,7 +284,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/outbound_payments", - api_mode="V1", base_address="api", params=params, options=options, @@ -305,7 +303,6 @@ def create( self._request( "post", "/v1/treasury/outbound_payments", - api_mode="V1", base_address="api", params=params, options=options, @@ -325,7 +322,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/outbound_payments", - api_mode="V1", base_address="api", params=params, options=options, @@ -348,7 +344,6 @@ def retrieve( "/v1/treasury/outbound_payments/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -371,7 +366,6 @@ async def retrieve_async( "/v1/treasury/outbound_payments/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -394,7 +388,6 @@ def cancel( "/v1/treasury/outbound_payments/{id}/cancel".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -417,7 +410,6 @@ async def cancel_async( "/v1/treasury/outbound_payments/{id}/cancel".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_outbound_transfer_service.py b/stripe/treasury/_outbound_transfer_service.py index c87bdde15..23f5e2275 100644 --- a/stripe/treasury/_outbound_transfer_service.py +++ b/stripe/treasury/_outbound_transfer_service.py @@ -117,7 +117,6 @@ def list( self._request( "get", "/v1/treasury/outbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -137,7 +136,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/outbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -157,7 +155,6 @@ def create( self._request( "post", "/v1/treasury/outbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -177,7 +174,6 @@ async def create_async( await self._request_async( "post", "/v1/treasury/outbound_transfers", - api_mode="V1", base_address="api", params=params, options=options, @@ -200,7 +196,6 @@ def retrieve( "/v1/treasury/outbound_transfers/{outbound_transfer}".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -223,7 +218,6 @@ async def retrieve_async( "/v1/treasury/outbound_transfers/{outbound_transfer}".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -246,7 +240,6 @@ def cancel( "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -269,7 +262,6 @@ async def cancel_async( "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel".format( outbound_transfer=sanitize_id(outbound_transfer), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_received_credit_service.py b/stripe/treasury/_received_credit_service.py index 250b663e4..0644fde0a 100644 --- a/stripe/treasury/_received_credit_service.py +++ b/stripe/treasury/_received_credit_service.py @@ -69,7 +69,6 @@ def list( self._request( "get", "/v1/treasury/received_credits", - api_mode="V1", base_address="api", params=params, options=options, @@ -89,7 +88,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/received_credits", - api_mode="V1", base_address="api", params=params, options=options, @@ -112,7 +110,6 @@ def retrieve( "/v1/treasury/received_credits/{id}".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, @@ -135,7 +132,6 @@ async def retrieve_async( "/v1/treasury/received_credits/{id}".format( id=sanitize_id(id) ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_received_debit_service.py b/stripe/treasury/_received_debit_service.py index e1ef7306d..dd3d55cf6 100644 --- a/stripe/treasury/_received_debit_service.py +++ b/stripe/treasury/_received_debit_service.py @@ -55,7 +55,6 @@ def list( self._request( "get", "/v1/treasury/received_debits", - api_mode="V1", base_address="api", params=params, options=options, @@ -75,7 +74,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/received_debits", - api_mode="V1", base_address="api", params=params, options=options, @@ -96,7 +94,6 @@ def retrieve( self._request( "get", "/v1/treasury/received_debits/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -117,7 +114,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/treasury/received_debits/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_transaction_entry_service.py b/stripe/treasury/_transaction_entry_service.py index 8d720fd40..cd456871b 100644 --- a/stripe/treasury/_transaction_entry_service.py +++ b/stripe/treasury/_transaction_entry_service.py @@ -102,7 +102,6 @@ def list( self._request( "get", "/v1/treasury/transaction_entries", - api_mode="V1", base_address="api", params=params, options=options, @@ -122,7 +121,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/transaction_entries", - api_mode="V1", base_address="api", params=params, options=options, @@ -145,7 +143,6 @@ def retrieve( "/v1/treasury/transaction_entries/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, @@ -168,7 +165,6 @@ async def retrieve_async( "/v1/treasury/transaction_entries/{id}".format( id=sanitize_id(id), ), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/stripe/treasury/_transaction_service.py b/stripe/treasury/_transaction_service.py index ac91f7fd8..7012cd3d9 100644 --- a/stripe/treasury/_transaction_service.py +++ b/stripe/treasury/_transaction_service.py @@ -113,7 +113,6 @@ def list( self._request( "get", "/v1/treasury/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -133,7 +132,6 @@ async def list_async( await self._request_async( "get", "/v1/treasury/transactions", - api_mode="V1", base_address="api", params=params, options=options, @@ -154,7 +152,6 @@ def retrieve( self._request( "get", "/v1/treasury/transactions/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, @@ -175,7 +172,6 @@ async def retrieve_async( await self._request_async( "get", "/v1/treasury/transactions/{id}".format(id=sanitize_id(id)), - api_mode="V1", base_address="api", params=params, options=options, diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index a2d197430..8acb0e87d 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -158,9 +158,7 @@ def test_param_encoding(self, requestor, http_client_mock): "get", query_string=query_string, rbody="{}", rcode=200 ) - requestor.request( - "get", "", self.ENCODE_INPUTS, base_address="api", api_mode="V1" - ) + requestor.request("get", "", self.ENCODE_INPUTS, base_address="api") http_client_mock.assert_requested("get", query_string=query_string) @@ -219,9 +217,7 @@ def test_url_construction(self, requestor, http_client_mock): rcode=200, ) - requestor.request( - "get", url, params, base_address="api", api_mode="V1" - ) + requestor.request("get", url, params, base_address="api") http_client_mock.assert_requested("get", abs_url=expected) @@ -232,7 +228,7 @@ def test_empty_methods(self, requestor, http_client_mock): ) resp = requestor.request( - meth, self.valid_path, {}, base_address="api", api_mode="V1" + meth, self.valid_path, {}, base_address="api" ) if meth == "post": @@ -256,7 +252,7 @@ async def test_empty_methods_async(self, requestor, http_client_mock): ) resp = await requestor.request_async( - meth, self.valid_path, {}, base_address="api", api_mode="V1" + meth, self.valid_path, {}, base_address="api" ) if meth == "post": @@ -291,7 +287,6 @@ async def async_iter(): self.valid_path, {}, base_address="api", - api_mode="V1", ) if meth == "post": @@ -320,7 +315,6 @@ def test_empty_methods_streaming_response( self.valid_path, {}, base_address="api", - api_mode="V1", ) if meth == "post": @@ -361,7 +355,6 @@ def test_methods_with_params_and_response( self.valid_path, params, base_address="api", - api_mode="V1", ) assert isinstance(resp, StripeObject) @@ -408,7 +401,6 @@ def test_methods_with_params_and_streaming_response( self.valid_path, params, base_address="api", - api_mode="V1", ) assert isinstance(resp, StripeStreamResponse) @@ -435,7 +427,6 @@ def test_uses_headers(self, requestor, http_client_mock): {}, options=request_options, base_address="api", - api_mode="V1", ) http_client_mock.assert_requested("get", extra_headers={"foo": "bar"}) @@ -449,7 +440,6 @@ def test_uses_api_version(self, requestor, http_client_mock): self.valid_path, options=request_options, base_address="api", - api_mode="V1", ) http_client_mock.assert_requested( "get", @@ -470,7 +460,6 @@ def test_prefers_headers_api_version(self, requestor, http_client_mock): {}, options=request_options, base_address="api", - api_mode="V1", ) http_client_mock.assert_requested( "get", @@ -485,9 +474,7 @@ def test_uses_instance_key(self, requestor, http_client_mock): "get", path=self.valid_path, rbody="{}", rcode=200 ) - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") http_client_mock.assert_requested("get", api_key=key) assert requestor.api_key == key @@ -502,9 +489,7 @@ def test_uses_instance_account(self, requestor, http_client_mock): "get", path=self.valid_path, rbody="{}", rcode=200 ) - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") http_client_mock.assert_requested( "get", @@ -545,9 +530,7 @@ def test_uses_app_info(self, requestor, http_client_mock): http_client_mock.stub_request( "get", path=self.valid_path, rbody="{}", rcode=200 ) - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") ua = "Stripe/v1 PythonBindings/%s" % (stripe.VERSION,) ua += " MyAwesomePlugin/1.2.34 (https://myawesomeplugin.info)" @@ -582,9 +565,7 @@ def fail(): mocker.patch("platform.platform", side_effect=fail) - requestor.request( - "get", self.valid_path, {}, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, {}, base_address="api") last_call = http_client_mock.get_last_call() last_call.assert_method("get") @@ -607,7 +588,6 @@ def test_uses_given_idempotency_key(self, requestor, http_client_mock): {}, options=request_options, base_address="api", - api_mode="V1", ) http_client_mock.assert_requested( @@ -621,9 +601,7 @@ def test_uuid4_idempotency_key_when_not_given( http_client_mock.stub_request( meth, path=self.valid_path, rbody="{}", rcode=200 ) - requestor.request( - meth, self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request(meth, self.valid_path, {}, base_address="api") http_client_mock.assert_requested( meth, idempotency_key=AnyUUID4Matcher(), post_data="" @@ -633,9 +611,7 @@ def test_fails_without_api_key(self, requestor): stripe.api_key = None with pytest.raises(stripe.error.AuthenticationError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_request_error_404(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -643,9 +619,7 @@ def test_invalid_request_error_404(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.InvalidRequestError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_request_error_400(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -653,9 +627,7 @@ def test_invalid_request_error_400(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.InvalidRequestError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_idempotency_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -666,9 +638,7 @@ def test_idempotency_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.IdempotencyError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_authentication_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -676,9 +646,7 @@ def test_authentication_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.AuthenticationError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_permissions_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -686,9 +654,7 @@ def test_permissions_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.PermissionError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_card_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -699,9 +665,7 @@ def test_card_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.CardError) as excinfo: - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") assert excinfo.value.code == "invalid_expiry_year" def test_rate_limit_error(self, requestor, http_client_mock): @@ -710,9 +674,7 @@ def test_rate_limit_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.RateLimitError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_old_rate_limit_error(self, requestor, http_client_mock): """ @@ -726,9 +688,7 @@ def test_old_rate_limit_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.RateLimitError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_server_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -736,9 +696,7 @@ def test_server_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.APIError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_json(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -746,13 +704,11 @@ def test_invalid_json(self, requestor, http_client_mock): ) with pytest.raises(stripe.error.APIError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_method(self, requestor): with pytest.raises(stripe.error.APIConnectionError): - requestor.request("foo", "bar", base_address="api", api_mode="V1") + requestor.request("foo", "bar", base_address="api") def test_oauth_invalid_requestor_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -763,9 +719,7 @@ def test_oauth_invalid_requestor_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.oauth_error.InvalidRequestError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_client_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -776,9 +730,7 @@ def test_invalid_client_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.oauth_error.InvalidClientError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_invalid_grant_error(self, requestor, http_client_mock): http_client_mock.stub_request( @@ -789,9 +741,7 @@ def test_invalid_grant_error(self, requestor, http_client_mock): ) with pytest.raises(stripe.oauth_error.InvalidGrantError): - requestor.request( - "get", self.valid_path, {}, base_address="api", api_mode="V1" - ) + requestor.request("get", self.valid_path, {}, base_address="api") def test_extract_error_from_stream_request_for_bytes( self, requestor, http_client_mock @@ -805,7 +755,7 @@ def test_extract_error_from_stream_request_for_bytes( with pytest.raises(stripe.oauth_error.InvalidGrantError): requestor.request_stream( - "get", self.valid_path, {}, base_address="api", api_mode="V1" + "get", self.valid_path, {}, base_address="api" ) def test_extract_error_from_stream_request_for_response( @@ -824,7 +774,7 @@ def test_extract_error_from_stream_request_for_response( with pytest.raises(stripe.oauth_error.InvalidGrantError): requestor.request_stream( - "get", self.valid_path, {}, base_address="api", api_mode="V1" + "get", self.valid_path, {}, base_address="api" ) def test_raw_request_with_file_param(self, requestor, http_client_mock): @@ -842,7 +792,6 @@ def test_raw_request_with_file_param(self, requestor, http_client_mock): params, supplied_headers, base_address="api", - api_mode="V1", ) assert supplied_headers["Content-Type"] == "multipart/form-data" diff --git a/tests/test_stripe_object.py b/tests/test_stripe_object.py index c75b06548..be893167a 100644 --- a/tests/test_stripe_object.py +++ b/tests/test_stripe_object.py @@ -405,7 +405,7 @@ def test_sends_request_with_api_key(self, http_client_mock): path="/foo", ) - obj._request("get", "/foo", base_address="api", api_mode="V1") + obj._request("get", "/foo", base_address="api") http_client_mock.assert_requested( api_key="key", @@ -416,9 +416,7 @@ def test_sends_request_with_api_key(self, http_client_mock): async def test_request_async_succeeds(self, http_client_mock): http_client_mock.stub_request("get", "/foo") obj = stripe.stripe_object.StripeObject("id", "key") - await obj._request_async( - "get", "/foo", base_address="api", api_mode="V1" - ) + await obj._request_async("get", "/foo", base_address="api") http_client_mock.assert_requested( api_key="key", stripe_account=None, @@ -448,7 +446,7 @@ def test_can_update_api_key(self, http_client_mock): ) obj.api_key = "key2" - obj._request("get", "/foo", base_address="api", api_mode="V1") + obj._request("get", "/foo", base_address="api") assert "api_key" not in obj.items() From 9c9c6df2911f94651c6467c8cbbd5dabd225cbf1 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:47:40 -0700 Subject: [PATCH 12/36] Generate SDK for OpenAPI spec version 1230 (#1385) --- OPENAPI_VERSION | 2 +- stripe/_account_link.py | 2 +- stripe/_account_link_service.py | 2 +- stripe/_charge.py | 12 +++++++++--- stripe/_charge_service.py | 8 ++++++-- stripe/_customer.py | 6 ++++-- stripe/_customer_service.py | 3 ++- stripe/_customer_session.py | 4 ++++ stripe/_customer_tax_id_service.py | 3 ++- stripe/_file.py | 5 ++++- stripe/_file_link.py | 2 +- stripe/_file_link_service.py | 2 +- stripe/_file_service.py | 4 +++- stripe/_invoice.py | 18 +++++++++++------- stripe/_invoice_line_item.py | 6 ++++++ stripe/_invoice_service.py | 10 ++++++---- stripe/_invoice_upcoming_lines_service.py | 5 +++-- stripe/_line_item.py | 2 +- stripe/_payment_intent.py | 18 +++++++++++++----- stripe/_payment_intent_service.py | 14 ++++++++++---- stripe/_payment_link.py | 12 ++++++++---- stripe/_payment_link_service.py | 12 ++++++++---- stripe/_subscription.py | 4 ++-- stripe/_subscription_schedule.py | 4 ++-- stripe/_subscription_schedule_service.py | 4 ++-- stripe/_subscription_service.py | 4 ++-- stripe/_tax_id.py | 6 ++++-- stripe/_tax_id_service.py | 3 ++- stripe/checkout/_session.py | 9 ++++++--- stripe/checkout/_session_service.py | 6 ++++-- stripe/tax/_calculation.py | 8 +++++--- stripe/tax/_calculation_service.py | 5 +++-- stripe/tax/_transaction.py | 3 ++- stripe/test_helpers/_test_clock.py | 14 ++++++++++++++ stripe/treasury/_inbound_transfer.py | 4 +++- stripe/treasury/_outbound_payment.py | 4 +++- stripe/treasury/_outbound_transfer.py | 4 +++- stripe/treasury/_received_credit.py | 4 +++- stripe/treasury/_transaction.py | 12 +++++++++--- stripe/treasury/_transaction_entry.py | 12 +++++++++--- 40 files changed, 183 insertions(+), 79 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 82e4a49f9..a02063ef6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1201 \ No newline at end of file +v1230 diff --git a/stripe/_account_link.py b/stripe/_account_link.py index 1e2452e4d..dce24a0c6 100644 --- a/stripe/_account_link.py +++ b/stripe/_account_link.py @@ -49,7 +49,7 @@ class CreateParams(RequestOptions): """ class CreateParamsCollectionOptions(TypedDict): - fields: Literal["currently_due", "eventually_due"] + fields: NotRequired[Literal["currently_due", "eventually_due"]] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. """ diff --git a/stripe/_account_link_service.py b/stripe/_account_link_service.py index da1cddd79..793610084 100644 --- a/stripe/_account_link_service.py +++ b/stripe/_account_link_service.py @@ -41,7 +41,7 @@ class CreateParams(TypedDict): """ class CreateParamsCollectionOptions(TypedDict): - fields: Literal["currently_due", "eventually_due"] + fields: NotRequired[Literal["currently_due", "eventually_due"]] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. """ diff --git a/stripe/_charge.py b/stripe/_charge.py index a1dd7cf1c..2bcb9b148 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1803,7 +1803,9 @@ class CaptureParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ @@ -1881,7 +1883,9 @@ class CreateParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ @@ -2324,7 +2328,9 @@ class SearchParams(RequestOptions): """ statement_descriptor: Optional[str] """ - For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: Optional[str] """ diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index 47506a7de..28992cf71 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -34,7 +34,9 @@ class CaptureParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ @@ -112,7 +114,9 @@ class CreateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. """ statement_descriptor_suffix: NotRequired[str] """ diff --git a/stripe/_customer.py b/stripe/_customer.py index 012fcbad8..500ba4759 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -537,6 +537,7 @@ class CreateParamsTaxIdDatum(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -580,7 +581,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -640,6 +641,7 @@ class CreateTaxIdParams(RequestOptions): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -683,7 +685,7 @@ class CreateTaxIdParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 16f5f092e..3c01eb8df 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -302,6 +302,7 @@ class CreateParamsTaxIdDatum(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -345,7 +346,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index 1e7791109..f1b9a9a89 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -21,6 +21,10 @@ class CustomerSession(CreateableAPIResource["CustomerSession"]): """ A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access control over a Customer. + + Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), + [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session), + [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer). """ OBJECT_NAME: ClassVar[Literal["customer_session"]] = "customer_session" diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 5efa2382e..af1ce221e 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -48,6 +48,7 @@ class CreateParams(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -91,7 +92,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_file.py b/stripe/_file.py index 65c797a6c..7c36c1e5b 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -51,6 +51,7 @@ class CreateParams(RequestOptions): "customer_signature", "dispute_evidence", "identity_document", + "issuing_regulatory_reporting", "pci_document", "tax_document_user_upload", "terminal_reader_splashscreen", @@ -62,7 +63,7 @@ class CreateParams(RequestOptions): class CreateParamsFileLinkData(TypedDict): create: bool """ - Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ expires_at: NotRequired[int] """ @@ -102,6 +103,7 @@ class ListParams(RequestOptions): "finance_report_run", "identity_document", "identity_document_downloadable", + "issuing_regulatory_reporting", "pci_document", "selfie", "sigma_scheduled_query", @@ -176,6 +178,7 @@ class RetrieveParams(RequestOptions): "finance_report_run", "identity_document", "identity_document_downloadable", + "issuing_regulatory_reporting", "pci_document", "selfie", "sigma_scheduled_query", diff --git a/stripe/_file_link.py b/stripe/_file_link.py index ff62720d5..02e1f2168 100644 --- a/stripe/_file_link.py +++ b/stripe/_file_link.py @@ -44,7 +44,7 @@ class CreateParams(RequestOptions): """ file: str """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ metadata: NotRequired["Literal['']|Dict[str, str]"] """ diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index 41166ff6f..73e955371 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -21,7 +21,7 @@ class CreateParams(TypedDict): """ file: str """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ metadata: NotRequired["Literal['']|Dict[str, str]"] """ diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 367109272..4c29215c4 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -31,6 +31,7 @@ class CreateParams(TypedDict): "customer_signature", "dispute_evidence", "identity_document", + "issuing_regulatory_reporting", "pci_document", "tax_document_user_upload", "terminal_reader_splashscreen", @@ -42,7 +43,7 @@ class CreateParams(TypedDict): class CreateParamsFileLinkData(TypedDict): create: bool """ - Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ expires_at: NotRequired[int] """ @@ -82,6 +83,7 @@ class ListParams(TypedDict): "finance_report_run", "identity_document", "identity_document_downloadable", + "issuing_regulatory_reporting", "pci_document", "selfie", "sigma_scheduled_query", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 29a1a9640..d07fda707 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -240,6 +240,7 @@ class CustomerTaxId(StripeObject): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -284,7 +285,7 @@ class CustomerTaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -2063,6 +2064,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -2106,7 +2108,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2450,7 +2452,7 @@ class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData( """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -3900,6 +3902,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -3943,7 +3946,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -4287,7 +4290,7 @@ class UpcomingLinesParamsScheduleDetailsPhaseAddInvoiceItemPriceData( """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -5034,6 +5037,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -5077,7 +5081,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -5411,7 +5415,7 @@ class UpcomingParamsScheduleDetailsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index cf6691f38..6d75beb36 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -25,6 +25,12 @@ class InvoiceLineItem(UpdateableAPIResource["InvoiceLineItem"]): + """ + Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. + + Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). + """ + OBJECT_NAME: ClassVar[Literal["line_item"]] = "line_item" class DiscountAmount(StripeObject): diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 9ba1ab735..510e62407 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -1088,6 +1088,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -1131,7 +1132,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -1479,7 +1480,7 @@ class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData( """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -2306,6 +2307,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -2349,7 +2351,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2689,7 +2691,7 @@ class UpcomingParamsScheduleDetailsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 80cb30a6a..a42d6a464 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -309,6 +309,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -352,7 +353,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -696,7 +697,7 @@ class ListParamsScheduleDetailsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_line_item.py b/stripe/_line_item.py index 9b1de7110..19641c124 100644 --- a/stripe/_line_item.py +++ b/stripe/_line_item.py @@ -88,7 +88,7 @@ class Tax(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ - description: str + description: Optional[str] """ An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 7ddf264ba..f2c006c3a 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2081,7 +2081,9 @@ class CaptureParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ @@ -4519,7 +4521,9 @@ class CreateParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ @@ -6783,7 +6787,7 @@ class IncrementAuthorizationParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + Text that appears on the customer's statement as the statement descriptor for a non-card or 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). """ transfer_data: NotRequired[ "PaymentIntent.IncrementAuthorizationParamsTransferData" @@ -6932,7 +6936,9 @@ class ModifyParams(RequestOptions): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ @@ -9305,7 +9311,9 @@ class VerifyMicrodepositsParams(RequestOptions): """ statement_descriptor: Optional[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: Optional[str] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index b63deeff4..29e858261 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -68,7 +68,9 @@ class CaptureParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ @@ -2534,7 +2536,9 @@ class CreateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ @@ -4822,7 +4826,7 @@ class IncrementAuthorizationParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + Text that appears on the customer's statement as the statement descriptor for a non-card or 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). """ transfer_data: NotRequired[ "PaymentIntentService.IncrementAuthorizationParamsTransferData" @@ -5001,7 +5005,9 @@ class UpdateParams(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 5d384e435..f6bf3ba2f 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -1194,11 +1194,13 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired[str] """ @@ -1994,11 +1996,13 @@ class ModifyParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired["Literal['']|str"] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired["Literal['']|str"] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired["Literal['']|str"] """ diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index b1dacbc1d..678cd5b7c 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -548,11 +548,13 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired[str] """ @@ -1346,11 +1348,13 @@ class UpdateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired["Literal['']|str"] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired["Literal['']|str"] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_group: NotRequired["Literal['']|str"] """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index a1e841553..f35851929 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -723,7 +723,7 @@ class CreateParamsAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -1541,7 +1541,7 @@ class ModifyParamsAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index d688436d7..f241ad1b5 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -765,7 +765,7 @@ class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -1395,7 +1395,7 @@ class ModifyParamsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index 4ec8d5603..938df116d 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -349,7 +349,7 @@ class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -997,7 +997,7 @@ class UpdateParamsPhaseAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index f183dc291..3735278e8 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -284,7 +284,7 @@ class CreateParamsAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ @@ -1158,7 +1158,7 @@ class UpdateParamsAddInvoiceItemPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. """ unit_amount_decimal: NotRequired[str] """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 436e6ade3..3c6ab718e 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -111,6 +111,7 @@ class CreateParams(RequestOptions): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -154,7 +155,7 @@ class CreateParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -281,6 +282,7 @@ class RetrieveParams(RequestOptions): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -325,7 +327,7 @@ class RetrieveParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index c2b1546df..87e07bc5b 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -52,6 +52,7 @@ class CreateParams(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -95,7 +96,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 644112811..5b1c4b8f4 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -370,6 +370,7 @@ class TaxId(StripeObject): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -414,7 +415,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: Optional[str] """ @@ -2412,11 +2413,13 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "Session.CreateParamsPaymentIntentDataTransferData" diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 10c03dcb6..a484a7081 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -829,11 +829,13 @@ class CreateParamsPaymentIntentData(TypedDict): """ statement_descriptor: NotRequired[str] """ - Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. 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. + 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. """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "SessionService.CreateParamsPaymentIntentDataTransferData" diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 69157e32b..07f6d8442 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -88,6 +88,7 @@ class TaxId(StripeObject): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -132,7 +133,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: str """ @@ -503,6 +504,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -546,7 +548,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -627,7 +629,7 @@ class CreateParamsShippingCost(TypedDict): """ tax_code: NotRequired[str] """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. + The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. """ class ListLineItemsParams(RequestOptions): diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index c1b68be72..cc367fc97 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -144,6 +144,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -187,7 +188,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -268,7 +269,7 @@ class CreateParamsShippingCost(TypedDict): """ tax_code: NotRequired[str] """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. + The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. """ class RetrieveParams(TypedDict): diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 4ae3ba540..8711f8d18 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -88,6 +88,7 @@ class TaxId(StripeObject): "gb_vat", "ge_vat", "hk_br", + "hr_oib", "hu_tin", "id_npwp", "il_vat", @@ -132,7 +133,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` """ value: str """ diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index b73b93ed9..c9eaab7ae 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -5,6 +5,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, List, Optional, cast, overload from typing_extensions import Literal, NotRequired, Unpack @@ -25,6 +26,16 @@ class TestClock( "test_helpers.test_clock" ) + class StatusDetails(StripeObject): + class Advancing(StripeObject): + target_frozen_time: int + """ + The `frozen_time` that the Test Clock is advancing towards. + """ + + advancing: Optional[Advancing] + _inner_class_types = {"advancing": Advancing} + class AdvanceParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -108,6 +119,7 @@ class RetrieveParams(RequestOptions): """ The status of the Test Clock. """ + status_details: Optional[StatusDetails] deleted: Optional[Literal[True]] """ Always true for a deleted object @@ -412,3 +424,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"status_details": StatusDetails} diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index d23b01a94..5976aa1eb 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -28,7 +28,9 @@ class InboundTransfer( ListableAPIResource["InboundTransfer"], ): """ - Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + + Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ OBJECT_NAME: ClassVar[Literal["treasury.inbound_transfer"]] = ( diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index db206c833..1104e2885 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -28,9 +28,11 @@ class OutboundPayment( ListableAPIResource["OutboundPayment"], ): """ - Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) """ OBJECT_NAME: ClassVar[Literal["treasury.outbound_payment"]] = ( diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index db574845d..1cfac43da 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -28,9 +28,11 @@ class OutboundTransfer( ListableAPIResource["OutboundTransfer"], ): """ - Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) """ OBJECT_NAME: ClassVar[Literal["treasury.outbound_transfer"]] = ( diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index 4aad11661..2e67c2832 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -130,9 +130,11 @@ class SourceFlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ - Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) """ payout: Optional["Payout"] """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index a8d220526..8652d29f5 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -59,7 +59,9 @@ class FlowDetails(StripeObject): """ inbound_transfer: Optional["InboundTransfer"] """ - Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + + Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ issuing_authorization: Optional["Authorization"] """ @@ -71,15 +73,19 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ - Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) """ outbound_transfer: Optional["OutboundTransfer"] """ - Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) """ received_credit: Optional["ReceivedCredit"] """ diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 6633d2785..7fba8ed23 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -60,7 +60,9 @@ class FlowDetails(StripeObject): """ inbound_transfer: Optional["InboundTransfer"] """ - Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + + Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ issuing_authorization: Optional["Authorization"] """ @@ -72,15 +74,19 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ - Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) """ outbound_transfer: Optional["OutboundTransfer"] """ - Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + + Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) """ received_credit: Optional["ReceivedCredit"] """ From 3d0426fea243a0b0031c827b78f68db680500b6e Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 29 Aug 2024 15:01:04 -0700 Subject: [PATCH 13/36] Bump version to 10.9.0 --- CHANGELOG.md | 15 +++++++++++---- VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ef47a0c..b4c6abdf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 10.9.0 - 2024-08-29 +* [#1385](https://github.com/stripe/stripe-python/pull/1385) Generate SDK for OpenAPI spec version 1230 + * Add support for `status_details` on resource `stripe.test_helpers.TestClock` + * Change type of `fields` on `stripe.AccountLink.CreateParamsCollectionOptions` from `Literal['currently_due', 'eventually_due']` to `NotRequired[Literal['currently_due', 'eventually_due']]` + * Add support for `hr_oib` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `issuing_regulatory_reporting` on enums `stripe.File.purpose`, `stripe.File.CreateParams.purpose`, and `stripe.File.ListParams.purpose` + ## 10.8.0 - 2024-08-15 * [#1373](https://github.com/stripe/stripe-python/pull/1373) Update generated code * Add support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card` @@ -30,10 +37,10 @@ ## 10.6.0 - 2024-08-01 * [#1369](https://github.com/stripe/stripe-python/pull/1369) Update generated code - * Add support for resource `stripe.billing.Alert` - * ⚠️ Remove support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card`. This was accidentally released last week. - * Add support for `billing.alert.triggered` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` - * Add support for `charge_exceeds_transaction_limit` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + * Add support for resource `stripe.billing.Alert` + * ⚠️ Remove support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card`. This was accidentally released last week. + * Add support for `billing.alert.triggered` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `charge_exceeds_transaction_limit` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` ## 10.5.0 - 2024-07-25 * [#1368](https://github.com/stripe/stripe-python/pull/1368) Update generated code diff --git a/VERSION b/VERSION index 2a3262d8a..fe6d2ac74 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.8.0 +10.9.0 diff --git a/stripe/_version.py b/stripe/_version.py index aa24b7374..164606a55 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.8.0" +VERSION = "10.9.0" From 90f59fc89808b1cbc824887deb0389d8219abd4b Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:50:42 -0700 Subject: [PATCH 14/36] Update generated code (#1376) * Update generated code for v1232 * Update generated code for v1233 * Update generated code for v1235 * Update generated code for v1238 * Update generated code for v1243 * Update generated code for v1244 * Update generated code for v1245 * Update generated code for v1246 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_invoice.py | 6 +++--- stripe/_invoice_service.py | 4 ++-- stripe/_invoice_upcoming_lines_service.py | 2 +- stripe/_payment_intent.py | 24 +++++++++++++++++++++++ stripe/_payment_intent_service.py | 6 ++++++ stripe/_transfer.py | 2 +- stripe/billing/_alert.py | 8 ++++++++ stripe/billing/_alert_service.py | 8 ++++++++ stripe/checkout/_session.py | 4 ++-- stripe/checkout/_session_service.py | 2 +- stripe/terminal/_reader.py | 2 +- stripe/terminal/_reader_service.py | 2 +- 13 files changed, 59 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a02063ef6..340c4578c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1230 +v1246 \ No newline at end of file diff --git a/stripe/_invoice.py b/stripe/_invoice.py index d07fda707..60d4947ea 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -1871,7 +1871,7 @@ class CreatePreviewParams(RequestOptions): List["Invoice.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.CreatePreviewParamsIssuer"] """ @@ -3647,7 +3647,7 @@ class UpcomingLinesParams(RequestOptions): List["Invoice.UpcomingLinesParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingLinesParamsIssuer"] """ @@ -4794,7 +4794,7 @@ class UpcomingParams(RequestOptions): """ invoice_items: NotRequired[List["Invoice.UpcomingParamsInvoiceItem"]] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 510e62407..340514e9e 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -891,7 +891,7 @@ class CreatePreviewParams(TypedDict): List["InvoiceService.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.CreatePreviewParamsIssuer"] """ @@ -2060,7 +2060,7 @@ class UpcomingParams(TypedDict): List["InvoiceService.UpcomingParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index a42d6a464..12e58adf8 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -52,7 +52,7 @@ class ListParams(TypedDict): List["InvoiceUpcomingLinesService.ListParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceUpcomingLinesService.ListParamsIssuer"] """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index f2c006c3a..78fdab4ed 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -9767,6 +9767,9 @@ def _cls_confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9807,6 +9810,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9837,6 +9843,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9867,6 +9876,9 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9906,6 +9918,9 @@ async def _cls_confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9946,6 +9961,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9976,6 +9994,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -10006,6 +10027,9 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 29e858261..9be12ae19 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -7630,6 +7630,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, @@ -7673,6 +7676,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 75512a1c9..17e743f78 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -265,7 +265,7 @@ class RetrieveReversalParams(RequestOptions): """ source_transaction: Optional[ExpandableField["Charge"]] """ - ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. """ source_type: Optional[str] """ diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index d2a2ddbac..02aecb7da 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -89,6 +89,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 31bda7bdb..39649a26a 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -51,6 +51,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 5b1c4b8f4..a447c8af4 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1886,7 +1886,7 @@ class CreateParams(RequestOptions): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ @@ -4109,7 +4109,7 @@ class RetrieveParams(RequestOptions): """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: Optional[str] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index a484a7081..628f7f237 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -288,7 +288,7 @@ class CreateParams(TypedDict): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 867dd6fe4..6d7553865 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -398,7 +398,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(RequestOptions): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """ diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 7b8739b94..362d89162 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -125,7 +125,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(TypedDict): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """ From f9ef46feb246a6d949185544ded1862e7d2f578c Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 5 Sep 2024 13:55:35 -0700 Subject: [PATCH 15/36] Bump version to 10.10.0 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4c6abdf5..30b85abb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 10.10.0 - 2024-09-05 +* [#1376](https://github.com/stripe/stripe-python/pull/1376) Update generated code + * Add support for `subscription` on parameter class `stripe.billing.Alert.CreateParamsFilter` + * Change type of `customer_consent_collected` on `stripe.terminal.Reader.ProcessSetupIntentParams` from `bool` to `NotRequired[bool]` + ## 10.9.0 - 2024-08-29 * [#1385](https://github.com/stripe/stripe-python/pull/1385) Generate SDK for OpenAPI spec version 1230 * Add support for `status_details` on resource `stripe.test_helpers.TestClock` diff --git a/VERSION b/VERSION index fe6d2ac74..e8a306979 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.9.0 +10.10.0 diff --git a/stripe/_version.py b/stripe/_version.py index 164606a55..2be36b44b 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.9.0" +VERSION = "10.10.0" From ecb46762b4d0afe1c8fd885259499b550bd931eb Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:53:38 -0700 Subject: [PATCH 16/36] Update generated code (#1391) * Update generated code for v1249 * Update generated code for v1250 * Update generated code for v1252 * Update generated code for v1255 * Update generated code for v1257 * Update generated code for v1259 * Update generated code for v1260 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/__init__.py | 6 + stripe/_customer.py | 12 + stripe/_customer_service.py | 8 + stripe/_invoice.py | 24 ++ stripe/_invoice_line_item.py | 4 +- stripe/_invoice_rendering_template.py | 385 ++++++++++++++++++ stripe/_invoice_rendering_template_service.py | 219 ++++++++++ stripe/_invoice_service.py | 16 + stripe/_object_classes.py | 1 + stripe/_payment_link.py | 9 + stripe/_payment_link_service.py | 8 + stripe/_quote.py | 4 +- stripe/_quote_service.py | 4 +- stripe/_stripe_client.py | 6 + stripe/_subscription.py | 6 + stripe/_subscription_service.py | 6 + stripe/api_resources/__init__.py | 3 + .../invoice_rendering_template.py | 21 + stripe/checkout/_session.py | 8 + stripe/checkout/_session_service.py | 4 + stripe/issuing/_card.py | 1 + stripe/terminal/_location.py | 2 +- stripe/terminal/_location_service.py | 2 +- stripe/test_helpers/_test_clock.py | 2 +- 25 files changed, 753 insertions(+), 10 deletions(-) create mode 100644 stripe/_invoice_rendering_template.py create mode 100644 stripe/_invoice_rendering_template_service.py create mode 100644 stripe/api_resources/invoice_rendering_template.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 340c4578c..ad548b855 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1246 \ No newline at end of file +v1260 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index e8d3e8578..9edd2b715 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -382,6 +382,12 @@ def __getattr__(name): from stripe._invoice_line_item_service import ( InvoiceLineItemService as InvoiceLineItemService, ) +from stripe._invoice_rendering_template import ( + InvoiceRenderingTemplate as InvoiceRenderingTemplate, +) +from stripe._invoice_rendering_template_service import ( + InvoiceRenderingTemplateService as InvoiceRenderingTemplateService, +) from stripe._invoice_service import InvoiceService as InvoiceService from stripe._invoice_upcoming_lines_service import ( InvoiceUpcomingLinesService as InvoiceUpcomingLinesService, diff --git a/stripe/_customer.py b/stripe/_customer.py index 500ba4759..b163859fc 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -112,6 +112,10 @@ class RenderingOptions(StripeObject): """ How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. """ + template: Optional[str] + """ + ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + """ custom_fields: Optional[List[CustomField]] """ @@ -452,6 +456,10 @@ class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): """ How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ class CreateParamsShipping(TypedDict): address: "Customer.CreateParamsShippingAddress" @@ -1112,6 +1120,10 @@ class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict): """ How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ class ModifyParamsShipping(TypedDict): address: "Customer.ModifyParamsShippingAddress" diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 3c01eb8df..100c7c367 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -217,6 +217,10 @@ class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): """ How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ class CreateParamsShipping(TypedDict): address: "CustomerService.CreateParamsShippingAddress" @@ -600,6 +604,10 @@ class UpdateParamsInvoiceSettingsRenderingOptions(TypedDict): """ How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ class UpdateParamsShipping(TypedDict): address: "CustomerService.UpdateParamsShippingAddress" diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 60d4947ea..8e83f0200 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -791,6 +791,14 @@ class Pdf(StripeObject): """ Invoice pdf rendering options """ + template: Optional[str] + """ + ID of the rendering template that the invoice is formatted by. + """ + template_version: Optional[int] + """ + Version of the rendering template that the invoice is using. + """ _inner_class_types = {"pdf": Pdf} class ShippingCost(StripeObject): @@ -1656,6 +1664,14 @@ class CreateParamsRendering(TypedDict): """ Invoice pdf rendering options """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ class CreateParamsRenderingPdf(TypedDict): page_size: NotRequired[Literal["a4", "auto", "letter"]] @@ -3342,6 +3358,14 @@ class ModifyParamsRendering(TypedDict): """ Invoice pdf rendering options """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ class ModifyParamsRenderingPdf(TypedDict): page_size: NotRequired[Literal["a4", "auto", "letter"]] diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 6d75beb36..0985834a8 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -386,11 +386,11 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): """ The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. """ - tax_amounts: Optional[List[TaxAmount]] + tax_amounts: List[TaxAmount] """ The amount of tax calculated per tax rate for this line item """ - tax_rates: Optional[List["TaxRate"]] + tax_rates: List["TaxRate"] """ The tax rates which apply to the line item. """ diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py new file mode 100644 index 000000000..5a57cf743 --- /dev/null +++ b/stripe/_invoice_rendering_template.py @@ -0,0 +1,385 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._request_options import RequestOptions +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, Dict, List, Optional, cast, overload +from typing_extensions import Literal, NotRequired, Unpack + + +class InvoiceRenderingTemplate( + ListableAPIResource["InvoiceRenderingTemplate"] +): + OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = ( + "invoice_rendering_template" + ) + + class ArchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(RequestOptions): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + status: NotRequired[Literal["active", "archived"]] + + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + version: NotRequired[int] + + class UnarchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nickname: Optional[str] + """ + A brief description of the template, hidden from customers + """ + object: Literal["invoice_rendering_template"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + status: Literal["active", "archived"] + """ + The status of the template, one of `active` or `archived`. + """ + version: int + """ + Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + """ + + @classmethod + def _cls_archive( + cls, + template: str, + **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + "InvoiceRenderingTemplate", + cls._static_request( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(template) + ), + params=params, + ), + ) + + @overload + @staticmethod + def archive( + template: str, + **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + ... + + @overload + def archive( + self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + ... + + @class_method_variant("_cls_archive") + def archive( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + "InvoiceRenderingTemplate", + self._request( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_archive_async( + cls, + template: str, + **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + "InvoiceRenderingTemplate", + await cls._static_request_async( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(template) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def archive_async( + template: str, + **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + ... + + @overload + async def archive_async( + self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + ... + + @class_method_variant("_cls_archive_async") + async def archive_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + "InvoiceRenderingTemplate", + await self._request_async( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["InvoiceRenderingTemplate.ListParams"] + ) -> ListObject["InvoiceRenderingTemplate"]: + """ + List all templates, ordered by creation date, with the most recently created template appearing first. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["InvoiceRenderingTemplate.ListParams"] + ) -> ListObject["InvoiceRenderingTemplate"]: + """ + List all templates, ordered by creation date, with the most recently created template appearing first. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, + id: str, + **params: Unpack["InvoiceRenderingTemplate.RetrieveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, + id: str, + **params: Unpack["InvoiceRenderingTemplate.RetrieveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def _cls_unarchive( + cls, + template: str, + **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + "InvoiceRenderingTemplate", + cls._static_request( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(template) + ), + params=params, + ), + ) + + @overload + @staticmethod + def unarchive( + template: str, + **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + ... + + @overload + def unarchive( + self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + ... + + @class_method_variant("_cls_unarchive") + def unarchive( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + "InvoiceRenderingTemplate", + self._request( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_unarchive_async( + cls, + template: str, + **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + "InvoiceRenderingTemplate", + await cls._static_request_async( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(template) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def unarchive_async( + template: str, + **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + ... + + @overload + async def unarchive_async( + self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + ... + + @class_method_variant("_cls_unarchive_async") + async def unarchive_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + ) -> "InvoiceRenderingTemplate": + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + "InvoiceRenderingTemplate", + await self._request_async( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(self.get("id")) + ), + params=params, + ), + ) diff --git a/stripe/_invoice_rendering_template_service.py b/stripe/_invoice_rendering_template_service.py new file mode 100644 index 000000000..239ee25b8 --- /dev/null +++ b/stripe/_invoice_rendering_template_service.py @@ -0,0 +1,219 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._invoice_rendering_template import InvoiceRenderingTemplate +from stripe._list_object import ListObject +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import List, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceRenderingTemplateService(StripeService): + class ArchiveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(TypedDict): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + status: NotRequired[Literal["active", "archived"]] + + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + version: NotRequired[int] + + class UnarchiveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def list( + self, + params: "InvoiceRenderingTemplateService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[InvoiceRenderingTemplate]: + """ + List all templates, ordered by creation date, with the most recently created template appearing first. + """ + return cast( + ListObject[InvoiceRenderingTemplate], + self._request( + "get", + "/v1/invoice_rendering_templates", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "InvoiceRenderingTemplateService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[InvoiceRenderingTemplate]: + """ + List all templates, ordered by creation date, with the most recently created template appearing first. + """ + return cast( + ListObject[InvoiceRenderingTemplate], + await self._request_async( + "get", + "/v1/invoice_rendering_templates", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + template: str, + params: "InvoiceRenderingTemplateService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + """ + return cast( + InvoiceRenderingTemplate, + self._request( + "get", + "/v1/invoice_rendering_templates/{template}".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + template: str, + params: "InvoiceRenderingTemplateService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + """ + return cast( + InvoiceRenderingTemplate, + await self._request_async( + "get", + "/v1/invoice_rendering_templates/{template}".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def archive( + self, + template: str, + params: "InvoiceRenderingTemplateService.ArchiveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + InvoiceRenderingTemplate, + self._request( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def archive_async( + self, + template: str, + params: "InvoiceRenderingTemplateService.ArchiveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + """ + return cast( + InvoiceRenderingTemplate, + await self._request_async( + "post", + "/v1/invoice_rendering_templates/{template}/archive".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def unarchive( + self, + template: str, + params: "InvoiceRenderingTemplateService.UnarchiveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + InvoiceRenderingTemplate, + self._request( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def unarchive_async( + self, + template: str, + params: "InvoiceRenderingTemplateService.UnarchiveParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceRenderingTemplate: + """ + Unarchive an invoice rendering template so it can be used on new Stripe objects again. + """ + return cast( + InvoiceRenderingTemplate, + await self._request_async( + "post", + "/v1/invoice_rendering_templates/{template}/unarchive".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 340514e9e..016c3c1bb 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -674,6 +674,14 @@ class CreateParamsRendering(TypedDict): """ Invoice pdf rendering options """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ class CreateParamsRenderingPdf(TypedDict): page_size: NotRequired[Literal["a4", "auto", "letter"]] @@ -3782,6 +3790,14 @@ class UpdateParamsRendering(TypedDict): """ Invoice pdf rendering options """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ class UpdateParamsRenderingPdf(TypedDict): page_size: NotRequired[Literal["a4", "auto", "letter"]] diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index c1d9e20d1..083d02566 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -66,6 +66,7 @@ stripe.Invoice.OBJECT_NAME: stripe.Invoice, stripe.InvoiceItem.OBJECT_NAME: stripe.InvoiceItem, stripe.InvoiceLineItem.OBJECT_NAME: stripe.InvoiceLineItem, + stripe.InvoiceRenderingTemplate.OBJECT_NAME: stripe.InvoiceRenderingTemplate, stripe.issuing.Authorization.OBJECT_NAME: stripe.issuing.Authorization, stripe.issuing.Card.OBJECT_NAME: stripe.issuing.Card, stripe.issuing.Cardholder.OBJECT_NAME: stripe.issuing.Cardholder, diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index f6bf3ba2f..9f22c9806 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -666,6 +666,7 @@ class TaxIdCollection(StripeObject): """ Indicates whether tax ID collection is enabled for the session. """ + required: Literal["if_supported", "never"] class TransferData(StripeObject): amount: Optional[int] @@ -1543,6 +1544,10 @@ class CreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ class CreateParamsTransferData(TypedDict): amount: NotRequired[int] @@ -2325,6 +2330,10 @@ class ModifyParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 678cd5b7c..3ff76553a 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -895,6 +895,10 @@ class CreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ class CreateParamsTransferData(TypedDict): amount: NotRequired[int] @@ -1675,6 +1679,10 @@ class UpdateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ def list( self, diff --git a/stripe/_quote.py b/stripe/_quote.py index 89da6af2d..4a6aada48 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -466,7 +466,7 @@ class CreateParams(RequestOptions): """ discounts: NotRequired["Literal['']|List[Quote.CreateParamsDiscount]"] """ - The discounts applied to the quote. You can only set up to one discount. + The discounts applied to the quote. """ expand: NotRequired[List[str]] """ @@ -802,7 +802,7 @@ class ModifyParams(RequestOptions): """ discounts: NotRequired["Literal['']|List[Quote.ModifyParamsDiscount]"] """ - The discounts applied to the quote. You can only set up to one discount. + The discounts applied to the quote. """ expand: NotRequired[List[str]] """ diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index c5d72560f..31ea86ee9 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -70,7 +70,7 @@ class CreateParams(TypedDict): "Literal['']|List[QuoteService.CreateParamsDiscount]" ] """ - The discounts applied to the quote. You can only set up to one discount. + The discounts applied to the quote. """ expand: NotRequired[List[str]] """ @@ -392,7 +392,7 @@ class UpdateParams(TypedDict): "Literal['']|List[QuoteService.UpdateParamsDiscount]" ] """ - The discounts applied to the quote. You can only set up to one discount. + The discounts applied to the quote. """ expand: NotRequired[List[str]] """ diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index d88ea65a4..8f52c2da8 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -59,6 +59,9 @@ from stripe._forwarding_service import ForwardingService from stripe._identity_service import IdentityService from stripe._invoice_service import InvoiceService +from stripe._invoice_rendering_template_service import ( + InvoiceRenderingTemplateService, +) from stripe._invoice_item_service import InvoiceItemService from stripe._issuing_service import IssuingService from stripe._mandate_service import MandateService @@ -204,6 +207,9 @@ def __init__( self.forwarding = ForwardingService(self._requestor) self.identity = IdentityService(self._requestor) self.invoices = InvoiceService(self._requestor) + self.invoice_rendering_templates = InvoiceRenderingTemplateService( + self._requestor, + ) self.invoice_items = InvoiceItemService(self._requestor) self.issuing = IssuingService(self._requestor) self.mandates = MandateService(self._requestor) diff --git a/stripe/_subscription.py b/stripe/_subscription.py index f35851929..ad418161e 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -1202,9 +1202,15 @@ class ListParams(RequestOptions): current_period_end: NotRequired[ "Subscription.ListParamsCurrentPeriodEnd|int" ] + """ + Only return subscriptions whose current_period_end falls within the given date interval. + """ current_period_start: NotRequired[ "Subscription.ListParamsCurrentPeriodStart|int" ] + """ + Only return subscriptions whose current_period_start falls within the given date interval. + """ customer: NotRequired[str] """ The ID of the customer whose subscriptions will be retrieved. diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 3735278e8..e034f9751 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -771,9 +771,15 @@ class ListParams(TypedDict): current_period_end: NotRequired[ "SubscriptionService.ListParamsCurrentPeriodEnd|int" ] + """ + Only return subscriptions whose current_period_end falls within the given date interval. + """ current_period_start: NotRequired[ "SubscriptionService.ListParamsCurrentPeriodStart|int" ] + """ + Only return subscriptions whose current_period_start falls within the given date interval. + """ customer: NotRequired[str] """ The ID of the customer whose subscriptions will be retrieved. diff --git a/stripe/api_resources/__init__.py b/stripe/api_resources/__init__.py index 73e6b55f7..99bf65826 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -78,6 +78,9 @@ from stripe.api_resources.invoice import Invoice from stripe.api_resources.invoice_item import InvoiceItem from stripe.api_resources.invoice_line_item import InvoiceLineItem + from stripe.api_resources.invoice_rendering_template import ( + InvoiceRenderingTemplate, + ) from stripe.api_resources.line_item import LineItem from stripe.api_resources.list_object import ListObject from stripe.api_resources.login_link import LoginLink diff --git a/stripe/api_resources/invoice_rendering_template.py b/stripe/api_resources/invoice_rendering_template.py new file mode 100644 index 000000000..e0b96650e --- /dev/null +++ b/stripe/api_resources/invoice_rendering_template.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.invoice_rendering_template package is deprecated, please change your + imports to import from stripe directly. + From: + from stripe.api_resources.invoice_rendering_template import InvoiceRenderingTemplate + To: + from stripe import InvoiceRenderingTemplate + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe._invoice_rendering_template import ( # noqa + InvoiceRenderingTemplate, + ) diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index a447c8af4..e6f7ba017 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1542,6 +1542,10 @@ class TaxIdCollection(StripeObject): """ Indicates whether tax ID collection is enabled for the session """ + required: Literal["if_supported", "never"] + """ + Indicates whether a tax ID is required on the payment page + """ class TotalDetails(StripeObject): class Breakdown(StripeObject): @@ -3791,6 +3795,10 @@ class CreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ class ExpireParams(RequestOptions): expand: NotRequired[List[str]] diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 628f7f237..e1010120d 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -2237,6 +2237,10 @@ class CreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ class ExpireParams(TypedDict): expand: NotRequired[List[str]] diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index f4c190958..37dc34817 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -160,6 +160,7 @@ class Customs(StripeObject): "pending", "returned", "shipped", + "submitted", ] ] """ diff --git a/stripe/terminal/_location.py b/stripe/terminal/_location.py index 1d5990791..e0a4cb4a2 100644 --- a/stripe/terminal/_location.py +++ b/stripe/terminal/_location.py @@ -63,7 +63,7 @@ class CreateParams(RequestOptions): """ display_name: str """ - A name for the location. + A name for the location. Maximum length is 1000 characters. """ expand: NotRequired[List[str]] """ diff --git a/stripe/terminal/_location_service.py b/stripe/terminal/_location_service.py index 427c395f7..bcbfed219 100644 --- a/stripe/terminal/_location_service.py +++ b/stripe/terminal/_location_service.py @@ -21,7 +21,7 @@ class CreateParams(TypedDict): """ display_name: str """ - A name for the location. + A name for the location. Maximum length is 1000 characters. """ expand: NotRequired[List[str]] """ diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index c9eaab7ae..0bee1d8f0 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -119,7 +119,7 @@ class RetrieveParams(RequestOptions): """ The status of the Test Clock. """ - status_details: Optional[StatusDetails] + status_details: StatusDetails deleted: Optional[Literal[True]] """ Always true for a deleted object From 7b6300fde765c22abd57381de7857172fa4b1282 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Thu, 12 Sep 2024 18:05:40 -0400 Subject: [PATCH 17/36] Bump version to 10.11.0 --- CHANGELOG.md | 10 ++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b85abb7..9aca996fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 10.11.0 - 2024-09-12 +* [#1391](https://github.com/stripe/stripe-python/pull/1391) Update generated code + * Add support for `template` on parameter classes `stripe.Customer.CreateParamsInvoiceSettingsRenderingOptions`, `stripe.Customer.ModifyParamsInvoiceSettingsRenderingOptions`, `stripe.Invoice.CreateParamsRendering`, and `stripe.Invoice.ModifyParamsRendering` and resource classes `stripe.Customer.InvoiceSettings.RenderingOptions` and `stripe.Invoice.Rendering` + * Add support for resource `stripe.InvoiceRenderingTemplate` + * Add support for `required` on parameter classes `stripe.PaymentLink.CreateParamsTaxIdCollection`, `stripe.PaymentLink.ModifyParamsTaxIdCollection`, and `stripe.checkout.Session.CreateParamsTaxIdCollection` and resource classes `stripe.PaymentLink.TaxIdCollection` and `stripe.checkout.Session.TaxIdCollection` + * Add support for `submitted` on enum `stripe.issuing.Card.Shipping.status` + * Change type of `tax_amounts` on `stripe.InvoiceLineItem` from `Optional[List[TaxAmount]]` to `List[TaxAmount]` + * Change type of `tax_rates` on `stripe.InvoiceLineItem` from `Optional[List[TaxRate]]` to `List[TaxRate]` + * Change type of `status_details` on `stripe.test_helpers.TestClock` from `Optional[StatusDetails]` to `StatusDetails` + ## 10.10.0 - 2024-09-05 * [#1376](https://github.com/stripe/stripe-python/pull/1376) Update generated code * Add support for `subscription` on parameter class `stripe.billing.Alert.CreateParamsFilter` diff --git a/VERSION b/VERSION index e8a306979..725870228 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.10.0 +10.11.0 diff --git a/stripe/_version.py b/stripe/_version.py index 2be36b44b..d9459cc8e 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.10.0" +VERSION = "10.11.0" From f6ce6ab076607d77e28eda3970759b8714d19dad Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:10:43 -0700 Subject: [PATCH 18/36] Update generated code (#1393) * Update generated code for v1254 * Update generated code for v1261 * Update generated code for v1263 * Update generated code for v1266 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 2 ++ stripe/_bank_account.py | 2 ++ stripe/_capability.py | 2 ++ stripe/_charge.py | 18 ++++++++++ stripe/_dispute.py | 16 +++++++-- stripe/_invoice.py | 5 +++ stripe/_invoice_rendering_template.py | 5 +++ stripe/_payment_intent.py | 1 + stripe/_person.py | 2 ++ stripe/_setup_attempt.py | 1 + stripe/_setup_intent.py | 1 + stripe/tax/_registration.py | 51 +++++++++++++++++++++++++++ stripe/tax/_registration_service.py | 28 +++++++++++++++ 14 files changed, 133 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ad548b855..1f205edf7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1260 \ No newline at end of file +v1266 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index f5246a701..db36e83a8 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -746,6 +746,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. @@ -895,6 +896,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 733b7ba0e..fc827b93b 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -126,6 +126,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. @@ -249,6 +250,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. diff --git a/stripe/_capability.py b/stripe/_capability.py index 0974b8d52..944236d60 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -120,6 +120,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. @@ -282,6 +283,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. diff --git a/stripe/_charge.py b/stripe/_charge.py index 2bcb9b148..9d0463bd5 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1286,6 +1286,23 @@ class Receipt(StripeObject): _inner_class_types = {"receipt": Receipt} class Klarna(StripeObject): + class PayerDetails(StripeObject): + class Address(StripeObject): + country: Optional[str] + """ + The payer address country + """ + + address: Optional[Address] + """ + The payer's address + """ + _inner_class_types = {"address": Address} + + payer_details: Optional[PayerDetails] + """ + The payer details for this transaction. + """ payment_method_category: Optional[str] """ The Klarna payment method used for this transaction. @@ -1296,6 +1313,7 @@ class Klarna(StripeObject): Preferred language of the Klarna authorization page that the customer is redirected to. Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` """ + _inner_class_types = {"payer_details": PayerDetails} class Konbini(StripeObject): class Store(StripeObject): diff --git a/stripe/_dispute.py b/stripe/_dispute.py index a7110e941..e75cf056f 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -165,6 +165,12 @@ class EvidenceDetails(StripeObject): """ class PaymentMethodDetails(StripeObject): + class AmazonPay(StripeObject): + dispute_type: Optional[Literal["chargeback", "claim"]] + """ + The AmazonPay dispute type, chargeback or claim + """ + class Card(StripeObject): brand: str """ @@ -195,14 +201,20 @@ class Paypal(StripeObject): The reason for the dispute as defined by PayPal """ + amazon_pay: Optional[AmazonPay] card: Optional[Card] klarna: Optional[Klarna] paypal: Optional[Paypal] - type: Literal["card", "klarna", "paypal"] + type: Literal["amazon_pay", "card", "klarna", "paypal"] """ Payment method type. """ - _inner_class_types = {"card": Card, "klarna": Klarna, "paypal": Paypal} + _inner_class_types = { + "amazon_pay": AmazonPay, + "card": Card, + "klarna": Klarna, + "paypal": Paypal, + } class CloseParams(RequestOptions): expand: NotRequired[List[str]] diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 8e83f0200..07f217f9e 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -479,6 +479,7 @@ class LastFinalizationError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_activation", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", @@ -6164,6 +6165,10 @@ class VoidInvoiceParams(RequestOptions): Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. """ automatic_tax: AutomaticTax + automatically_finalizes_at: Optional[int] + """ + The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + """ billing_reason: Optional[ Literal[ "automatic_pending_invoice_item_invoice", diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py index 5a57cf743..5d7dc7e2f 100644 --- a/stripe/_invoice_rendering_template.py +++ b/stripe/_invoice_rendering_template.py @@ -11,6 +11,11 @@ class InvoiceRenderingTemplate( ListableAPIResource["InvoiceRenderingTemplate"] ): + """ + Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + can be created from within the Dashboard, and they can be used over the API when creating invoices. + """ + OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = ( "invoice_rendering_template" ) diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 78fdab4ed..974f9e729 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -255,6 +255,7 @@ class LastPaymentError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_activation", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", diff --git a/stripe/_person.py b/stripe/_person.py index 33b573801..7082f215b 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -246,6 +246,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. @@ -443,6 +444,7 @@ class Error(StripeObject): "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", "verification_requires_additional_proof_of_registration", + "verification_supportability", ] """ The code for the type of error. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 1745937ef..d9d8d570b 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -591,6 +591,7 @@ class SetupError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_activation", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index b19a36352..ed2da02a6 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -240,6 +240,7 @@ class LastSetupError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_activation", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 807558ad0..43bcb69a7 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -582,12 +582,34 @@ class LocalLeaseTax(StripeObject): A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. """ + class StateSalesTax(StripeObject): + class Election(StripeObject): + jurisdiction: Optional[str] + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + """ + type: Literal[ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax", + ] + """ + The type of the election for the state sales tax registration. + """ + + elections: Optional[List[Election]] + """ + Elections for the state sales tax registration. + """ + _inner_class_types = {"elections": Election} + local_amusement_tax: Optional[LocalAmusementTax] local_lease_tax: Optional[LocalLeaseTax] state: str """ Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). """ + state_sales_tax: Optional[StateSalesTax] type: Literal[ "local_amusement_tax", "local_lease_tax", @@ -600,6 +622,7 @@ class LocalLeaseTax(StripeObject): _inner_class_types = { "local_amusement_tax": LocalAmusementTax, "local_lease_tax": LocalLeaseTax, + "state_sales_tax": StateSalesTax, } class Vn(StripeObject): @@ -1650,6 +1673,12 @@ class CreateParamsCountryOptionsUs(TypedDict): """ Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). """ + state_sales_tax: NotRequired[ + "Registration.CreateParamsCountryOptionsUsStateSalesTax" + ] + """ + Options for the state sales tax registration. + """ type: Literal[ "local_amusement_tax", "local_lease_tax", @@ -1672,6 +1701,28 @@ class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). """ + class CreateParamsCountryOptionsUsStateSalesTax(TypedDict): + elections: List[ + "Registration.CreateParamsCountryOptionsUsStateSalesTaxElection" + ] + """ + Elections for the state sales tax registration. + """ + + class CreateParamsCountryOptionsUsStateSalesTaxElection(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). + """ + type: Literal[ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax", + ] + """ + The type of the election for the state sales tax registration. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index 1f9b4ba93..fd7ccda89 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -934,6 +934,12 @@ class CreateParamsCountryOptionsUs(TypedDict): """ Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). """ + state_sales_tax: NotRequired[ + "RegistrationService.CreateParamsCountryOptionsUsStateSalesTax" + ] + """ + Options for the state sales tax registration. + """ type: Literal[ "local_amusement_tax", "local_lease_tax", @@ -956,6 +962,28 @@ class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). """ + class CreateParamsCountryOptionsUsStateSalesTax(TypedDict): + elections: List[ + "RegistrationService.CreateParamsCountryOptionsUsStateSalesTaxElection" + ] + """ + Elections for the state sales tax registration. + """ + + class CreateParamsCountryOptionsUsStateSalesTaxElection(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). + """ + type: Literal[ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax", + ] + """ + The type of the election for the state sales tax registration. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ From 6288acd773e5d4fdd31c58f7728f77c3383c8128 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:29:52 -0700 Subject: [PATCH 19/36] Update generated code for v1267 (#1394) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/treasury/_received_debit.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1f205edf7..5f5b31119 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1266 \ No newline at end of file +v1267 \ No newline at end of file diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index fe167d746..798915fab 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -267,7 +267,11 @@ class RetrieveParams(RequestOptions): """ failure_code: Optional[ Literal[ - "account_closed", "account_frozen", "insufficient_funds", "other" + "account_closed", + "account_frozen", + "insufficient_funds", + "international_transaction", + "other", ] ] """ From 3587026b839435d072b7d220967c476d4c6b9a9b Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 18 Sep 2024 11:39:46 -0700 Subject: [PATCH 20/36] Bump version to 10.12.0 --- CHANGELOG.md | 12 ++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aca996fd..e71c80fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## 10.12.0 - 2024-09-18 +* [#1394](https://github.com/stripe/stripe-python/pull/1394) Update generated code + * Add support for `international_transaction` on enum `stripe.treasury.ReceivedDebit.failure_code` +* [#1393](https://github.com/stripe/stripe-python/pull/1393) Update generated code + * Add support for `payer_details` on resource class `stripe.Charge.PaymentMethodDetails.Klarna` + * Add support for `amazon_pay` on resource class `stripe.Dispute.PaymentMethodDetails` + * Add support for `automatically_finalizes_at` on resource `stripe.Invoice` + * Add support for `state_sales_tax` on resource class `stripe.tax.Registration.CountryOptions.Us` and parameter class `stripe.tax.Registration.CreateParamsCountryOptionsUs` + * Add support for `verification_supportability` 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 `amazon_pay` on enum `stripe.Dispute.PaymentMethodDetails.type` + * Add support for `terminal_reader_invalid_location_for_activation` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + ## 10.11.0 - 2024-09-12 * [#1391](https://github.com/stripe/stripe-python/pull/1391) Update generated code * Add support for `template` on parameter classes `stripe.Customer.CreateParamsInvoiceSettingsRenderingOptions`, `stripe.Customer.ModifyParamsInvoiceSettingsRenderingOptions`, `stripe.Invoice.CreateParamsRendering`, and `stripe.Invoice.ModifyParamsRendering` and resource classes `stripe.Customer.InvoiceSettings.RenderingOptions` and `stripe.Invoice.Rendering` diff --git a/VERSION b/VERSION index 725870228..c4d592e16 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.11.0 +10.12.0 diff --git a/stripe/_version.py b/stripe/_version.py index d9459cc8e..b20ec0ac7 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.11.0" +VERSION = "10.12.0" From de20eeb9f480bde3db4a1e71b592dab76733991c Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:36:24 -0700 Subject: [PATCH 21/36] Support for APIs in the new API version 2024-09-30.acacia (#1404) --- OPENAPI_VERSION | 2 +- examples/README.md | 11 + examples/meter_event_stream.py | 44 ++ examples/new_example.py | 8 + examples/stripe_webhook_handler.py | 40 ++ stripe/__init__.py | 55 +- stripe/_api_mode.py | 2 +- stripe/_api_requestor.py | 175 +++-- stripe/_api_resource.py | 3 +- stripe/_api_version.py | 2 +- stripe/_base_address.py | 3 +- stripe/_billing_service.py | 14 + stripe/_capability.py | 2 +- stripe/_credit_note.py | 25 + stripe/_credit_note_line_item.py | 25 + stripe/_customer.py | 5 +- stripe/_encode.py | 21 +- stripe/_error.py | 16 +- stripe/_http_client.py | 26 +- stripe/_invoice.py | 30 + stripe/_invoice_line_item.py | 30 + stripe/_margin.py | 50 ++ stripe/_multipart_data_generator.py | 2 +- stripe/_oauth.py | 2 +- stripe/_oauth_service.py | 2 +- stripe/_object_classes.py | 13 + stripe/_product.py | 26 +- stripe/_product_service.py | 26 +- stripe/_promotion_code.py | 6 +- stripe/_promotion_code_service.py | 4 +- stripe/_request_options.py | 5 + stripe/_requestor_options.py | 13 + stripe/_stripe_client.py | 98 ++- stripe/_stripe_object.py | 2 - stripe/_subscription.py | 48 +- stripe/_subscription_service.py | 12 +- stripe/_util.py | 35 +- stripe/_v2_services.py | 12 + stripe/_webhook_endpoint.py | 1 + stripe/_webhook_endpoint_service.py | 1 + stripe/api_resources/__init__.py | 1 + stripe/api_resources/billing/__init__.py | 7 + .../billing/credit_balance_summary.py | 21 + .../billing/credit_balance_transaction.py | 21 + stripe/api_resources/billing/credit_grant.py | 21 + stripe/api_resources/margin.py | 21 + stripe/billing/__init__.py | 16 + stripe/billing/_alert.py | 61 +- stripe/billing/_alert_service.py | 36 +- stripe/billing/_credit_balance_summary.py | 158 +++++ .../_credit_balance_summary_service.py | 83 +++ stripe/billing/_credit_balance_transaction.py | 242 +++++++ .../_credit_balance_transaction_service.py | 125 ++++ stripe/billing/_credit_grant.py | 599 ++++++++++++++++++ stripe/billing/_credit_grant_service.py | 381 +++++++++++ stripe/billing_portal/_configuration.py | 11 +- .../billing_portal/_configuration_service.py | 11 +- stripe/checkout/_session.py | 2 +- stripe/checkout/_session_service.py | 2 +- stripe/events/__init__.py | 8 + stripe/events/_event_classes.py | 14 + ...ling_meter_error_report_triggered_event.py | 122 ++++ .../_v1_billing_meter_no_meter_found_event.py | 88 +++ stripe/tax/_settings.py | 2 +- stripe/terminal/_reader.py | 10 +- stripe/terminal/_reader_service.py | 10 +- stripe/treasury/_received_credit.py | 7 +- stripe/v2/__init__.py | 10 + stripe/v2/_amount.py | 14 + stripe/v2/_billing_service.py | 24 + stripe/v2/_core_service.py | 10 + stripe/v2/_event.py | 124 ++++ stripe/v2/_list_object.py | 59 ++ stripe/v2/billing/__init__.py | 21 + stripe/v2/billing/_meter_event.py | 46 ++ stripe/v2/billing/_meter_event_adjustment.py | 51 ++ .../_meter_event_adjustment_service.py | 67 ++ stripe/v2/billing/_meter_event_service.py | 72 +++ stripe/v2/billing/_meter_event_session.py | 36 ++ .../billing/_meter_event_session_service.py | 50 ++ .../v2/billing/_meter_event_stream_service.py | 71 +++ stripe/v2/core/__init__.py | 3 + stripe/v2/core/_event_service.py | 102 +++ .../abstract/test_api_resource.py | 2 +- tests/api_resources/test_list_object.py | 6 +- tests/api_resources/test_list_object_v2.py | 147 +++++ .../test_search_result_object.py | 2 +- tests/fixtures/card.json | 26 - tests/http_client_mock.py | 2 + tests/test_api_requestor.py | 300 ++++++--- tests/test_generated_examples.py | 106 +--- tests/test_http_client.py | 28 +- tests/test_integration.py | 69 +- tests/test_raw_request.py | 225 +++++++ tests/test_request_options.py | 2 + tests/test_requestor_options.py | 13 + tests/test_stripe_client.py | 70 +- tests/test_util.py | 4 +- tests/test_v2_error.py | 141 +++++ tests/test_v2_event.py | 110 ++++ tests/test_webhook.py | 12 +- 101 files changed, 4575 insertions(+), 427 deletions(-) create mode 100644 examples/README.md create mode 100644 examples/meter_event_stream.py create mode 100644 examples/new_example.py create mode 100644 examples/stripe_webhook_handler.py create mode 100644 stripe/_margin.py create mode 100644 stripe/_v2_services.py create mode 100644 stripe/api_resources/billing/credit_balance_summary.py create mode 100644 stripe/api_resources/billing/credit_balance_transaction.py create mode 100644 stripe/api_resources/billing/credit_grant.py create mode 100644 stripe/api_resources/margin.py create mode 100644 stripe/billing/_credit_balance_summary.py create mode 100644 stripe/billing/_credit_balance_summary_service.py create mode 100644 stripe/billing/_credit_balance_transaction.py create mode 100644 stripe/billing/_credit_balance_transaction_service.py create mode 100644 stripe/billing/_credit_grant.py create mode 100644 stripe/billing/_credit_grant_service.py create mode 100644 stripe/events/__init__.py create mode 100644 stripe/events/_event_classes.py create mode 100644 stripe/events/_v1_billing_meter_error_report_triggered_event.py create mode 100644 stripe/events/_v1_billing_meter_no_meter_found_event.py create mode 100644 stripe/v2/__init__.py create mode 100644 stripe/v2/_amount.py create mode 100644 stripe/v2/_billing_service.py create mode 100644 stripe/v2/_core_service.py create mode 100644 stripe/v2/_event.py create mode 100644 stripe/v2/_list_object.py create mode 100644 stripe/v2/billing/__init__.py create mode 100644 stripe/v2/billing/_meter_event.py create mode 100644 stripe/v2/billing/_meter_event_adjustment.py create mode 100644 stripe/v2/billing/_meter_event_adjustment_service.py create mode 100644 stripe/v2/billing/_meter_event_service.py create mode 100644 stripe/v2/billing/_meter_event_session.py create mode 100644 stripe/v2/billing/_meter_event_session_service.py create mode 100644 stripe/v2/billing/_meter_event_stream_service.py create mode 100644 stripe/v2/core/__init__.py create mode 100644 stripe/v2/core/_event_service.py create mode 100644 tests/api_resources/test_list_object_v2.py delete mode 100644 tests/fixtures/card.json create mode 100644 tests/test_raw_request.py create mode 100644 tests/test_v2_error.py create mode 100644 tests/test_v2_event.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5f5b31119..8f166ae2e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1267 \ No newline at end of file +v1268 \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..c73c6149f --- /dev/null +++ b/examples/README.md @@ -0,0 +1,11 @@ +## Running an example + +From the examples folder, run: +`PYTHONPATH=../ python your_example.py` + +## Adding a new example + +1. Clone new_example.py +2. Implement your example +3. Run it (as per above) +4. 👍 diff --git a/examples/meter_event_stream.py b/examples/meter_event_stream.py new file mode 100644 index 000000000..0d02bb9d8 --- /dev/null +++ b/examples/meter_event_stream.py @@ -0,0 +1,44 @@ +from datetime import datetime, timezone +import stripe + +# Global variable for the meter event session +meter_event_session = None + + +def refresh_meter_event_session(api_key): + global meter_event_session + + # Check if the session is None or expired + if meter_event_session is None or datetime.fromisoformat( + meter_event_session["expires_at"] + ) <= datetime.now(timezone.utc): + # Create a new meter event session if the existing session has expired + client = stripe.StripeClient(api_key) + meter_event_session = client.v2.billing.meter_event_session.create() + + +def send_meter_event(meter_event, api_key): + # Refresh the meter event session if necessary + refresh_meter_event_session(api_key) + if not meter_event_session: + raise RuntimeError("Unable to refresh meter event session") + + # Create a meter event with the current session's authentication token + client = stripe.StripeClient(meter_event_session["authentication_token"]) + client.v2.billing.meter_event_stream.create( + params={"events": [meter_event]} + ) + + +# Set your API key here +api_key = "{{API_KEY}}" +customer_id = "{{CUSTOMER_ID}}" + +# Send meter event +send_meter_event( + { + "event_name": "alpaca_ai_tokens", + "payload": {"stripe_customer_id": customer_id, "value": "25"}, + }, + api_key, +) diff --git a/examples/new_example.py b/examples/new_example.py new file mode 100644 index 000000000..53a93e7e6 --- /dev/null +++ b/examples/new_example.py @@ -0,0 +1,8 @@ +import stripe + +# Set your API key here +api_key = "{{API_KEY}}" + +print("Hello world") +# client = stripe.StripeClient(api_key) +# client.v2.... diff --git a/examples/stripe_webhook_handler.py b/examples/stripe_webhook_handler.py new file mode 100644 index 000000000..e4452d9c7 --- /dev/null +++ b/examples/stripe_webhook_handler.py @@ -0,0 +1,40 @@ +import os +from stripe import StripeClient +from stripe.events import V1BillingMeterErrorReportTriggeredEvent + +from flask import Flask, request, jsonify + +app = Flask(__name__) +api_key = os.environ.get("STRIPE_API_KEY") +webhook_secret = os.environ.get("WEBHOOK_SECRET") + +client = StripeClient(api_key) + + +@app.route("/webhook", methods=["POST"]) +def webhook(): + webhook_body = request.data + sig_header = request.headers.get("Stripe-Signature") + + try: + thin_event = client.parse_thin_event( + webhook_body, sig_header, webhook_secret + ) + + # Fetch the event data to understand the failure + event = client.v2.core.events.retrieve(thin_event.id) + if isinstance(event, V1BillingMeterErrorReportTriggeredEvent): + meter = event.fetch_related_object() + meter_id = meter.id + print("Success! " + str(meter_id)) + + # Record the failures and alert your team + # Add your logic here + + return jsonify(success=True), 200 + except Exception as e: + return jsonify(error=str(e)), 400 + + +if __name__ == "__main__": + app.run(port=4242) diff --git a/stripe/__init__.py b/stripe/__init__.py index 9edd2b715..0300781a1 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -2,6 +2,7 @@ from typing import Optional import sys as _sys import os +import warnings # Stripe Python bindings # API docs at http://stripe.com/docs/api @@ -25,6 +26,7 @@ DEFAULT_API_BASE: str = "https://api.stripe.com" DEFAULT_CONNECT_API_BASE: str = "https://connect.stripe.com" DEFAULT_UPLOAD_API_BASE: str = "https://files.stripe.com" +DEFAULT_METER_EVENTS_API_BASE: str = "https://meter-events.stripe.com" api_key: Optional[str] = None @@ -32,22 +34,62 @@ api_base: str = DEFAULT_API_BASE connect_api_base: str = DEFAULT_CONNECT_API_BASE upload_api_base: str = DEFAULT_UPLOAD_API_BASE +meter_events_api_base: str = DEFAULT_METER_EVENTS_API_BASE api_version: str = _ApiVersion.CURRENT verify_ssl_certs: bool = True proxy: Optional[str] = None default_http_client: Optional["HTTPClient"] = None app_info: Optional[AppInfo] = None enable_telemetry: bool = True -max_network_retries: int = 0 +max_network_retries: int = 2 ca_bundle_path: str = os.path.join( os.path.dirname(__file__), "data", "ca-certificates.crt" ) +# Lazily initialized stripe.default_http_client +default_http_client = None +_default_proxy = None + + +def ensure_default_http_client(): + if default_http_client: + _warn_if_mismatched_proxy() + return + _init_default_http_client() + + +def _init_default_http_client(): + global _default_proxy + global default_http_client + + # If the stripe.default_http_client has not been set by the user + # yet, we'll set it here. This way, we aren't creating a new + # HttpClient for every request. + default_http_client = new_default_http_client( + verify_ssl_certs=verify_ssl_certs, proxy=proxy + ) + _default_proxy = proxy + + +def _warn_if_mismatched_proxy(): + global _default_proxy + from stripe import proxy + + if proxy != _default_proxy: + warnings.warn( + "stripe.proxy was updated after sending a " + "request - this is a no-op. To use a different proxy, " + "set stripe.default_http_client to a new client " + "configured with the proxy." + ) + + # Set to either 'debug' or 'info', controls console logging log: Optional[Literal["debug", "info"]] = None # OAuth from stripe._oauth import OAuth as OAuth +from stripe._oauth_service import OAuthService as OAuthService # Webhooks from stripe._webhook import ( @@ -58,6 +100,8 @@ # StripeClient from stripe._stripe_client import StripeClient as StripeClient # noqa +from stripe.v2._event import ThinEvent as ThinEvent # noqa + # Sets some basic information about the running application that's sent along # with API requests. Useful for plugin authors to identify their plugin when @@ -180,8 +224,6 @@ def set_app_info( from stripe import _request_metrics as request_metrics from stripe._file import File as FileUpload - import warnings - # Python 3.7+ supports module level __getattr__ that allows us to lazy load deprecated modules # this matters because if we pre-load all modules from api_resources while suppressing warning # users will never see those warnings @@ -218,6 +260,7 @@ def __getattr__(name): checkout as checkout, climate as climate, entitlements as entitlements, + events as events, financial_connections as financial_connections, forwarding as forwarding, identity as identity, @@ -229,6 +272,7 @@ def __getattr__(name): terminal as terminal, test_helpers as test_helpers, treasury as treasury, + v2 as v2, ) from stripe._account import Account as Account from stripe._account_capability_service import ( @@ -355,6 +399,9 @@ def __getattr__(name): from stripe._ephemeral_key_service import ( EphemeralKeyService as EphemeralKeyService, ) +from stripe._error import ( + TemporarySessionExpiredError as TemporarySessionExpiredError, +) from stripe._event import Event as Event from stripe._event_service import EventService as EventService from stripe._exchange_rate import ExchangeRate as ExchangeRate @@ -397,6 +444,7 @@ def __getattr__(name): from stripe._login_link import LoginLink as LoginLink from stripe._mandate import Mandate as Mandate from stripe._mandate_service import MandateService as MandateService +from stripe._margin import Margin as Margin from stripe._payment_intent import PaymentIntent as PaymentIntent from stripe._payment_intent_service import ( PaymentIntentService as PaymentIntentService, @@ -529,6 +577,7 @@ def __getattr__(name): from stripe._usage_record_summary import ( UsageRecordSummary as UsageRecordSummary, ) +from stripe._v2_services import V2Services as V2Services from stripe._webhook_endpoint import WebhookEndpoint as WebhookEndpoint from stripe._webhook_endpoint_service import ( WebhookEndpointService as WebhookEndpointService, diff --git a/stripe/_api_mode.py b/stripe/_api_mode.py index 1503e56e0..7290784d3 100644 --- a/stripe/_api_mode.py +++ b/stripe/_api_mode.py @@ -1,4 +1,4 @@ from typing_extensions import Literal -ApiMode = Literal["V1"] +ApiMode = Literal["V1", "V2"] diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 61f3085eb..65bb449fe 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -29,15 +29,14 @@ log_info, dashboard_link, _convert_to_stripe_object, + get_api_mode, ) from stripe._version import VERSION import stripe._error as error import stripe.oauth_error as oauth_error from stripe._multipart_data_generator import MultipartDataGenerator from urllib.parse import urlencode -from stripe._encode import ( - _api_encode, -) +from stripe._encode import _api_encode, _json_encode_date_callback from stripe._stripe_response import ( StripeResponse, StripeStreamResponse, @@ -183,8 +182,8 @@ def request( base_address: BaseAddress, usage: Optional[List[str]] = None, ) -> "StripeObject": + api_mode = get_api_mode(url) requestor = self._replace_options(options) - api_mode = "V1" rbody, rcode, rheaders = requestor.request_raw( method.lower(), url, @@ -195,15 +194,17 @@ def request( options=options, usage=usage, ) - resp = requestor._interpret_response(rbody, rcode, rheaders) + resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode) - return _convert_to_stripe_object( + obj = _convert_to_stripe_object( resp=resp, params=params, requestor=requestor, api_mode=api_mode, ) + return obj + async def request_async( self, method: str, @@ -214,7 +215,7 @@ async def request_async( base_address: BaseAddress, usage: Optional[List[str]] = None, ) -> "StripeObject": - api_mode = "V1" + api_mode = get_api_mode(url) requestor = self._replace_options(options) rbody, rcode, rheaders = await requestor.request_raw_async( method.lower(), @@ -226,15 +227,17 @@ async def request_async( options=options, usage=usage, ) - resp = requestor._interpret_response(rbody, rcode, rheaders) + resp = requestor._interpret_response(rbody, rcode, rheaders, api_mode) - return _convert_to_stripe_object( + obj = _convert_to_stripe_object( resp=resp, params=params, requestor=requestor, api_mode=api_mode, ) + return obj + def request_stream( self, method: str, @@ -245,7 +248,7 @@ def request_stream( base_address: BaseAddress, usage: Optional[List[str]] = None, ) -> StripeStreamResponse: - api_mode = "V1" + api_mode = get_api_mode(url) stream, rcode, rheaders = self.request_raw( method.lower(), url, @@ -262,6 +265,7 @@ def request_stream( cast(IOBase, stream), rcode, rheaders, + api_mode, ) return resp @@ -275,7 +279,7 @@ async def request_stream_async( base_address: BaseAddress, usage: Optional[List[str]] = None, ) -> StripeStreamResponseAsync: - api_mode = "V1" + api_mode = get_api_mode(url) stream, rcode, rheaders = await self.request_raw_async( method.lower(), url, @@ -290,10 +294,13 @@ async def request_stream_async( stream, rcode, rheaders, + api_mode, ) return resp - def handle_error_response(self, rbody, rcode, resp, rheaders) -> NoReturn: + def handle_error_response( + self, rbody, rcode, resp, rheaders, api_mode + ) -> NoReturn: try: error_data = resp["error"] except (KeyError, TypeError): @@ -316,15 +323,60 @@ def handle_error_response(self, rbody, rcode, resp, rheaders) -> NoReturn: ) if err is None: - err = self.specific_api_error( - rbody, rcode, resp, rheaders, error_data + err = ( + self.specific_v2_api_error( + rbody, rcode, resp, rheaders, error_data + ) + if api_mode == "V2" + else self.specific_v1_api_error( + rbody, rcode, resp, rheaders, error_data + ) ) raise err - def specific_api_error(self, rbody, rcode, resp, rheaders, error_data): + def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): + type = error_data.get("type") + code = error_data.get("code") + message = error_data.get("message") + error_args = { + "message": message, + "http_body": rbody, + "http_status": rcode, + "json_body": resp, + "headers": rheaders, + "code": code, + } + log_info( - "Stripe API error received", + "Stripe v2 API error received", + error_code=code, + error_type=error_data.get("type"), + error_message=message, + error_param=error_data.get("param"), + ) + + if type == "idempotency_error": + return error.IdempotencyError( + message, + rbody, + rcode, + resp, + rheaders, + code, + ) + # switchCases: The beginning of the section generated from our OpenAPI spec + elif type == "temporary_session_expired": + return error.TemporarySessionExpiredError(**error_args) + # switchCases: The end of the section generated from our OpenAPI spec + + return self.specific_v1_api_error( + rbody, rcode, resp, rheaders, error_data + ) + + def specific_v1_api_error(self, rbody, rcode, resp, rheaders, error_data): + log_info( + "Stripe v1 API error received", error_code=error_data.get("code"), error_type=error_data.get("type"), error_message=error_data.get("message"), @@ -402,8 +454,13 @@ def specific_oauth_error(self, rbody, rcode, resp, rheaders, error_code): return None - def request_headers(self, method, options: RequestOptions): - user_agent = "Stripe/v1 PythonBindings/%s" % (VERSION,) + def request_headers( + self, method: HttpVerb, api_mode: ApiMode, options: RequestOptions + ): + user_agent = "Stripe/%s PythonBindings/%s" % ( + api_mode.lower(), + VERSION, + ) if stripe.app_info: user_agent += " " + self._format_app_info(stripe.app_info) @@ -436,13 +493,23 @@ def request_headers(self, method, options: RequestOptions): if stripe_account: headers["Stripe-Account"] = stripe_account + stripe_context = options.get("stripe_context") + if stripe_context: + headers["Stripe-Context"] = stripe_context + idempotency_key = options.get("idempotency_key") if idempotency_key: headers["Idempotency-Key"] = idempotency_key - if method == "post": + # IKs should be set for all POST requests and v2 delete requests + if method == "post" or (api_mode == "V2" and method == "delete"): headers.setdefault("Idempotency-Key", str(uuid.uuid4())) - headers["Content-Type"] = "application/x-www-form-urlencoded" + + if method == "post": + if api_mode == "V2": + headers["Content-Type"] = "application/json" + else: + headers["Content-Type"] = "application/x-www-form-urlencoded" stripe_version = options.get("stripe_version") if stripe_version: @@ -462,10 +529,19 @@ def _args_for_request_with_retries( usage: Optional[List[str]] = None, ): """ - Mechanism for issuing an API call + Mechanism for issuing an API call. Used by request_raw and request_raw_async. """ request_options = merge_options(self._options, options) + # Special stripe_version handling for v2 requests: + if ( + options + and "stripe_version" in options + and (options["stripe_version"] is not None) + ): + # If user specified an API version, honor it + request_options["stripe_version"] = options["stripe_version"] + if request_options.get("api_key") is None: raise error.AuthenticationError( "No API key provided. (HINT: set your API key using " @@ -480,14 +556,19 @@ def _args_for_request_with_retries( url, ) - encoded_params = urlencode(list(_api_encode(params or {}))) + encoded_params = urlencode(list(_api_encode(params or {}, api_mode))) # Don't use strict form encoding by changing the square bracket control # characters back to their literals. This is fine by the server, and # makes these parameter strings easier to read. encoded_params = encoded_params.replace("%5B", "[").replace("%5D", "]") - encoded_body = encoded_params + if api_mode == "V2": + encoded_body = json.dumps( + params or {}, default=_json_encode_date_callback + ) + else: + encoded_body = encoded_params supplied_headers = None if ( @@ -496,7 +577,12 @@ def _args_for_request_with_retries( ): supplied_headers = dict(request_options["headers"]) - headers = self.request_headers(method, request_options) + headers = self.request_headers( + # this cast is safe because the blocks below validate that `method` is one of the allowed values + cast(HttpVerb, method), + api_mode, + request_options, + ) if method == "get" or method == "delete": if params: @@ -714,6 +800,7 @@ def _interpret_response( rbody: object, rcode: int, rheaders: Mapping[str, str], + api_mode: ApiMode, ) -> StripeResponse: try: if hasattr(rbody, "decode"): @@ -734,30 +821,17 @@ def _interpret_response( rheaders, ) if self._should_handle_code_as_error(rcode): - self.handle_error_response(rbody, rcode, resp.data, rheaders) - return resp - - async def _interpret_streaming_response_async( - self, - stream: AsyncIterable[bytes], - rcode: int, - rheaders: Mapping[str, str], - ) -> StripeStreamResponseAsync: - if self._should_handle_code_as_error(rcode): - json_content = b"".join([chunk async for chunk in stream]) - self._interpret_response(json_content, rcode, rheaders) - # _interpret_response is guaranteed to throw since we've checked self._should_handle_code_as_error - raise RuntimeError( - "_interpret_response should have raised an error" + self.handle_error_response( + rbody, rcode, resp.data, rheaders, api_mode ) - else: - return StripeStreamResponseAsync(stream, rcode, rheaders) + return resp def _interpret_streaming_response( self, stream: IOBase, rcode: int, rheaders: Mapping[str, str], + api_mode: ApiMode, ) -> StripeStreamResponse: # Streaming response are handled with minimal processing for the success # case (ie. we don't want to read the content). When an error is @@ -775,10 +849,27 @@ def _interpret_streaming_response( % self._get_http_client().name ) - self._interpret_response(json_content, rcode, rheaders) + self._interpret_response(json_content, rcode, rheaders, api_mode) # _interpret_response is guaranteed to throw since we've checked self._should_handle_code_as_error raise RuntimeError( "_interpret_response should have raised an error" ) else: return StripeStreamResponse(stream, rcode, rheaders) + + async def _interpret_streaming_response_async( + self, + stream: AsyncIterable[bytes], + rcode: int, + rheaders: Mapping[str, str], + api_mode: ApiMode, + ) -> StripeStreamResponseAsync: + if self._should_handle_code_as_error(rcode): + json_content = b"".join([chunk async for chunk in stream]) + self._interpret_response(json_content, rcode, rheaders, api_mode) + # _interpret_response is guaranteed to throw since we've checked self._should_handle_code_as_error + raise RuntimeError( + "_interpret_response should have raised an error" + ) + else: + return StripeStreamResponseAsync(stream, rcode, rheaders) diff --git a/stripe/_api_resource.py b/stripe/_api_resource.py index 1fb402ab8..2866b42c1 100644 --- a/stripe/_api_resource.py +++ b/stripe/_api_resource.py @@ -99,6 +99,7 @@ async def _request_async( params=None, *, base_address: BaseAddress = "api", + api_mode: ApiMode = "V1", ) -> StripeObject: obj = await StripeObject._request_async( self, @@ -109,7 +110,7 @@ async def _request_async( ) if type(self) is type(obj): - self._refresh_from(values=obj, api_mode="V1") + self._refresh_from(values=obj, api_mode=api_mode) return self else: return obj diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 3e3f977ff..e23615373 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-06-20" + CURRENT = "2024-09-30.acacia" diff --git a/stripe/_base_address.py b/stripe/_base_address.py index aa7a133e7..b45e6eda5 100644 --- a/stripe/_base_address.py +++ b/stripe/_base_address.py @@ -2,10 +2,11 @@ from typing_extensions import NotRequired, TypedDict, Literal -BaseAddress = Literal["api", "files", "connect"] +BaseAddress = Literal["api", "files", "connect", "meter_events"] class BaseAddresses(TypedDict): api: NotRequired[Optional[str]] connect: NotRequired[Optional[str]] files: NotRequired[Optional[str]] + meter_events: NotRequired[Optional[str]] diff --git a/stripe/_billing_service.py b/stripe/_billing_service.py index e30f30081..a94b4f57c 100644 --- a/stripe/_billing_service.py +++ b/stripe/_billing_service.py @@ -2,6 +2,13 @@ # File generated from our OpenAPI spec from stripe._stripe_service import StripeService from stripe.billing._alert_service import AlertService +from stripe.billing._credit_balance_summary_service import ( + CreditBalanceSummaryService, +) +from stripe.billing._credit_balance_transaction_service import ( + CreditBalanceTransactionService, +) +from stripe.billing._credit_grant_service import CreditGrantService from stripe.billing._meter_event_adjustment_service import ( MeterEventAdjustmentService, ) @@ -13,6 +20,13 @@ class BillingService(StripeService): def __init__(self, requestor): super().__init__(requestor) self.alerts = AlertService(self._requestor) + self.credit_balance_summary = CreditBalanceSummaryService( + self._requestor, + ) + self.credit_balance_transactions = CreditBalanceTransactionService( + self._requestor, + ) + self.credit_grants = CreditGrantService(self._requestor) self.meters = MeterService(self._requestor) self.meter_events = MeterEventService(self._requestor) self.meter_event_adjustments = MeterEventAdjustmentService( diff --git a/stripe/_capability.py b/stripe/_capability.py index 944236d60..d83ba3b62 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -368,7 +368,7 @@ class Error(StripeObject): requirements: Optional[Requirements] status: Literal["active", "disabled", "inactive", "pending", "unrequested"] """ - The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. + The status of the capability. """ def instance_url(self): diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 8054b28e5..6e5ae51ff 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -27,6 +27,9 @@ from stripe._refund import Refund from stripe._shipping_rate import ShippingRate from stripe._tax_rate import TaxRate + from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction, + ) @nested_resource_class_methods("line") @@ -53,6 +56,26 @@ class DiscountAmount(StripeObject): The discount that was applied to get this discount amount. """ + class PretaxCreditAmount(StripeObject): + amount: int + """ + The amount, in cents (or local equivalent), of the pretax credit amount. + """ + credit_balance_transaction: Optional[ + ExpandableField["CreditBalanceTransaction"] + ] + """ + The credit balance transaction that was applied to get this pretax credit amount. + """ + discount: Optional[ExpandableField["Discount"]] + """ + The discount that was applied to get this pretax credit amount. + """ + type: Literal["credit_balance_transaction", "discount"] + """ + Type of the pretax credit amount referenced. + """ + class ShippingCost(StripeObject): class Tax(StripeObject): amount: int @@ -711,6 +734,7 @@ class VoidCreditNoteParams(RequestOptions): """ The link to download the PDF of the credit note. """ + pretax_credit_amounts: Optional[List[PretaxCreditAmount]] reason: Optional[ Literal[ "duplicate", "fraudulent", "order_change", "product_unsatisfactory" @@ -1122,6 +1146,7 @@ async def list_lines_async( _inner_class_types = { "discount_amounts": DiscountAmount, + "pretax_credit_amounts": PretaxCreditAmount, "shipping_cost": ShippingCost, "tax_amounts": TaxAmount, } diff --git a/stripe/_credit_note_line_item.py b/stripe/_credit_note_line_item.py index 40ebeb2df..04505cf83 100644 --- a/stripe/_credit_note_line_item.py +++ b/stripe/_credit_note_line_item.py @@ -8,6 +8,9 @@ if TYPE_CHECKING: from stripe._discount import Discount from stripe._tax_rate import TaxRate + from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction, + ) class CreditNoteLineItem(StripeObject): @@ -29,6 +32,26 @@ class DiscountAmount(StripeObject): The discount that was applied to get this discount amount. """ + class PretaxCreditAmount(StripeObject): + amount: int + """ + The amount, in cents (or local equivalent), of the pretax credit amount. + """ + credit_balance_transaction: Optional[ + ExpandableField["CreditBalanceTransaction"] + ] + """ + The credit balance transaction that was applied to get this pretax credit amount. + """ + discount: Optional[ExpandableField["Discount"]] + """ + The discount that was applied to get this pretax credit amount. + """ + type: Literal["credit_balance_transaction", "discount"] + """ + Type of the pretax credit amount referenced. + """ + class TaxAmount(StripeObject): amount: int """ @@ -105,6 +128,7 @@ class TaxAmount(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + pretax_credit_amounts: Optional[List[PretaxCreditAmount]] quantity: Optional[int] """ The number of units of product being credited. @@ -135,5 +159,6 @@ class TaxAmount(StripeObject): """ _inner_class_types = { "discount_amounts": DiscountAmount, + "pretax_credit_amounts": PretaxCreditAmount, "tax_amounts": TaxAmount, } diff --git a/stripe/_customer.py b/stripe/_customer.py index b163859fc..001126339 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -63,9 +63,8 @@ class Customer( UpdateableAPIResource["Customer"], ): """ - This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer. - - Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment) + This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + and track payments that belong to the same customer. """ OBJECT_NAME: ClassVar[Literal["customer"]] = "customer" diff --git a/stripe/_encode.py b/stripe/_encode.py index 9552a739e..181038ef0 100644 --- a/stripe/_encode.py +++ b/stripe/_encode.py @@ -2,7 +2,7 @@ import datetime import time from collections import OrderedDict -from typing import Generator, Tuple, Any +from typing import Generator, Optional, Tuple, Any def _encode_datetime(dttime: datetime.datetime): @@ -21,7 +21,15 @@ def _encode_nested_dict(key, data, fmt="%s[%s]"): return d -def _api_encode(data) -> Generator[Tuple[str, Any], None, None]: +def _json_encode_date_callback(value): + if isinstance(value, datetime.datetime): + return _encode_datetime(value) + return value + + +def _api_encode( + data, api_mode: Optional[str] +) -> Generator[Tuple[str, Any], None, None]: for key, value in data.items(): if value is None: continue @@ -29,15 +37,16 @@ def _api_encode(data) -> Generator[Tuple[str, Any], None, None]: yield (key, value.stripe_id) elif isinstance(value, list) or isinstance(value, tuple): for i, sv in enumerate(value): + encoded_key = key if api_mode == "V2" else "%s[%d]" % (key, i) if isinstance(sv, dict): - subdict = _encode_nested_dict("%s[%d]" % (key, i), sv) - for k, v in _api_encode(subdict): + subdict = _encode_nested_dict(encoded_key, sv) + for k, v in _api_encode(subdict, api_mode): yield (k, v) else: - yield ("%s[%d]" % (key, i), sv) + yield (encoded_key, sv) elif isinstance(value, dict): subdict = _encode_nested_dict(key, value) - for subkey, subvalue in _api_encode(subdict): + for subkey, subvalue in _api_encode(subdict, api_mode): yield (subkey, subvalue) elif isinstance(value, datetime.datetime): yield (key, _encode_datetime(value)) diff --git a/stripe/_error.py b/stripe/_error.py index aba72701d..3b486ee79 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -1,7 +1,6 @@ from typing import Dict, Optional, Union, cast -# Used for global variable -import stripe # noqa: IMP101 +import stripe # noqa from stripe._error_object import ErrorObject @@ -13,7 +12,7 @@ class StripeError(Exception): headers: Optional[Dict[str, str]] code: Optional[str] request_id: Optional[str] - error: Optional[ErrorObject] + error: Optional["ErrorObject"] def __init__( self, @@ -76,10 +75,13 @@ def _construct_error_object(self) -> Optional[ErrorObject]: or not isinstance(self.json_body["error"], dict) ): return None + from stripe._error_object import ErrorObject return ErrorObject._construct_from( values=self.json_body["error"], requestor=stripe._APIRequestor._global_instance(), + # We pass in API mode as "V1" here because it's required, + # but ErrorObject is reused for both V1 and V2 errors. api_mode="V1", ) @@ -177,3 +179,11 @@ class SignatureVerificationError(StripeError): def __init__(self, message, sig_header, http_body=None): super(SignatureVerificationError, self).__init__(message, http_body) self.sig_header = sig_header + + +# classDefinitions: The beginning of the section generated from our OpenAPI spec +class TemporarySessionExpiredError(StripeError): + pass + + +# classDefinitions: The end of the section generated from our OpenAPI spec diff --git a/stripe/_http_client.py b/stripe/_http_client.py index 459b40ae5..0db2ef3f5 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -148,7 +148,7 @@ class _Proxy(TypedDict): http: Optional[str] https: Optional[str] - MAX_DELAY = 2 + MAX_DELAY = 5 INITIAL_DELAY = 0.5 MAX_RETRY_AFTER = 60 _proxy: Optional[_Proxy] @@ -242,10 +242,11 @@ def _sleep_time_seconds( self, num_retries: int, response: Optional[Tuple[Any, Any, Mapping[str, str]]] = None, - ): - # Apply exponential backoff with initial_network_retry_delay on the - # number of num_retries so far as inputs. - # Do not allow the number to exceed max_network_retry_delay. + ) -> float: + """ + Apply exponential backoff with initial_network_retry_delay on the number of num_retries so far as inputs. + Do not allow the number to exceed `max_network_retry_delay`. + """ sleep_seconds = min( HTTPClient.INITIAL_DELAY * (2 ** (num_retries - 1)), HTTPClient.MAX_DELAY, @@ -263,9 +264,11 @@ def _sleep_time_seconds( return sleep_seconds - def _add_jitter_time(self, sleep_seconds: float): - # Randomize the value in [(sleep_seconds/ 2) to (sleep_seconds)] - # Also separated method here to isolate randomness for tests + def _add_jitter_time(self, sleep_seconds: float) -> float: + """ + Randomize the value in `[(sleep_seconds/ 2) to (sleep_seconds)]`. + Also separated method here to isolate randomness for tests + """ sleep_seconds *= 0.5 * (1 + random.uniform(0, 1)) return sleep_seconds @@ -900,6 +903,11 @@ def close(self): pass +class _Proxy(TypedDict): + http: Optional[ParseResult] + https: Optional[ParseResult] + + class PycurlClient(HTTPClient): class _ParsedProxy(TypedDict, total=False): http: Optional[ParseResult] @@ -1025,7 +1033,7 @@ def _request_internal( self._curl.setopt(self.pycurl.TIMEOUT, 80) self._curl.setopt( self.pycurl.HTTPHEADER, - ["%s: %s" % (k, v) for k, v in iter(dict(headers).items())], + ["%s: %s" % (k, v) for k, v in dict(headers).items()], ) if self._verify_ssl_certs: self._curl.setopt(self.pycurl.CAINFO, stripe.ca_bundle_path) diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 07f217f9e..db9966044 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -40,6 +40,7 @@ from stripe._customer import Customer from stripe._discount import Discount from stripe._invoice_line_item import InvoiceLineItem + from stripe._margin import Margin from stripe._payment_intent import PaymentIntent from stripe._payment_method import PaymentMethod from stripe._quote import Quote @@ -49,6 +50,9 @@ from stripe._subscription import Subscription from stripe._tax_id import TaxId from stripe._tax_rate import TaxRate + from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction, + ) from stripe.test_helpers._test_clock import TestClock @@ -965,6 +969,30 @@ class TotalDiscountAmount(StripeObject): The discount that was applied to get this discount amount. """ + class TotalPretaxCreditAmount(StripeObject): + amount: int + """ + The amount, in cents (or local equivalent), of the pretax credit amount. + """ + credit_balance_transaction: Optional[ + ExpandableField["CreditBalanceTransaction"] + ] + """ + The credit balance transaction that was applied to get this pretax credit amount. + """ + discount: Optional[ExpandableField["Discount"]] + """ + The discount that was applied to get this pretax credit amount. + """ + margin: Optional[ExpandableField["Margin"]] + """ + The margin that was applied to get this pretax credit amount. + """ + type: Literal["credit_balance_transaction", "discount"] + """ + Type of the pretax credit amount referenced. + """ + class TotalTaxAmount(StripeObject): amount: int """ @@ -6445,6 +6473,7 @@ class VoidInvoiceParams(RequestOptions): """ The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. """ + total_pretax_credit_amounts: Optional[List[TotalPretaxCreditAmount]] total_tax_amounts: List[TotalTaxAmount] """ The aggregate amounts calculated per tax rate for all line items. @@ -7811,6 +7840,7 @@ async def list_lines_async( "subscription_details": SubscriptionDetails, "threshold_reason": ThresholdReason, "total_discount_amounts": TotalDiscountAmount, + "total_pretax_credit_amounts": TotalPretaxCreditAmount, "total_tax_amounts": TotalTaxAmount, "transfer_data": TransferData, } diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 0985834a8..c81defb72 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -17,11 +17,15 @@ if TYPE_CHECKING: from stripe._discount import Discount from stripe._invoice_item import InvoiceItem + from stripe._margin import Margin from stripe._plan import Plan from stripe._price import Price from stripe._subscription import Subscription from stripe._subscription_item import SubscriptionItem from stripe._tax_rate import TaxRate + from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction, + ) class InvoiceLineItem(UpdateableAPIResource["InvoiceLineItem"]): @@ -53,6 +57,30 @@ class Period(StripeObject): The start of the period. This value is inclusive. """ + class PretaxCreditAmount(StripeObject): + amount: int + """ + The amount, in cents (or local equivalent), of the pretax credit amount. + """ + credit_balance_transaction: Optional[ + ExpandableField["CreditBalanceTransaction"] + ] + """ + The credit balance transaction that was applied to get this pretax credit amount. + """ + discount: Optional[ExpandableField["Discount"]] + """ + The discount that was applied to get this pretax credit amount. + """ + margin: Optional[ExpandableField["Margin"]] + """ + The margin that was applied to get this pretax credit amount. + """ + type: Literal["credit_balance_transaction", "discount"] + """ + Type of the pretax credit amount referenced. + """ + class ProrationDetails(StripeObject): class CreditedItems(StripeObject): invoice: str @@ -362,6 +390,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): """ The plan of the subscription, if the line item is a subscription or a proration. """ + pretax_credit_amounts: Optional[List[PretaxCreditAmount]] price: Optional["Price"] """ The price of the line item. @@ -446,6 +475,7 @@ async def modify_async( _inner_class_types = { "discount_amounts": DiscountAmount, "period": Period, + "pretax_credit_amounts": PretaxCreditAmount, "proration_details": ProrationDetails, "tax_amounts": TaxAmount, } diff --git a/stripe/_margin.py b/stripe/_margin.py new file mode 100644 index 000000000..949e35f9b --- /dev/null +++ b/stripe/_margin.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Dict, Optional +from typing_extensions import Literal + + +class Margin(StripeObject): + """ + A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who + resell products and services and earn a discount (margin) for doing so. + """ + + OBJECT_NAME: ClassVar[Literal["margin"]] = "margin" + active: bool + """ + Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + name: Optional[str] + """ + Name of the margin that's displayed on, for example, invoices. + """ + object: Literal["margin"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + percent_off: float + """ + Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + """ + updated: int + """ + Time at which the object was last updated. Measured in seconds since the Unix epoch. + """ diff --git a/stripe/_multipart_data_generator.py b/stripe/_multipart_data_generator.py index 3151df83e..1e0be2ba1 100644 --- a/stripe/_multipart_data_generator.py +++ b/stripe/_multipart_data_generator.py @@ -19,7 +19,7 @@ def __init__(self, chunk_size: int = 1028): def add_params(self, params): # Flatten parameters first - params = dict(_api_encode(params)) + params = dict(_api_encode(params, "V1")) for key, value in params.items(): if value is None: diff --git a/stripe/_oauth.py b/stripe/_oauth.py index c2bd478b0..9940bd3ed 100644 --- a/stripe/_oauth.py +++ b/stripe/_oauth.py @@ -315,7 +315,7 @@ def authorize_url( OAuth._set_client_id(params) if "response_type" not in params: params["response_type"] = "code" - query = urlencode(list(_api_encode(params))) + query = urlencode(list(_api_encode(params, "V1"))) url = connect_api_base + path + "?" + query return url diff --git a/stripe/_oauth_service.py b/stripe/_oauth_service.py index 7c24269f5..2a1edc83c 100644 --- a/stripe/_oauth_service.py +++ b/stripe/_oauth_service.py @@ -57,7 +57,7 @@ def authorize_url( self._set_client_id(params) if "response_type" not in params: params["response_type"] = "code" - query = urlencode(list(_api_encode(params))) + query = urlencode(list(_api_encode(params, "V1"))) # connect_api_base will be always set to stripe.DEFAULT_CONNECT_API_BASE # if it is not overridden on the client explicitly. diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 083d02566..fb0a0ba5b 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -22,6 +22,9 @@ stripe.billing_portal.Session.OBJECT_NAME: stripe.billing_portal.Session, stripe.billing.Alert.OBJECT_NAME: stripe.billing.Alert, stripe.billing.AlertTriggered.OBJECT_NAME: stripe.billing.AlertTriggered, + stripe.billing.CreditBalanceSummary.OBJECT_NAME: stripe.billing.CreditBalanceSummary, + stripe.billing.CreditBalanceTransaction.OBJECT_NAME: stripe.billing.CreditBalanceTransaction, + stripe.billing.CreditGrant.OBJECT_NAME: stripe.billing.CreditGrant, stripe.billing.Meter.OBJECT_NAME: stripe.billing.Meter, stripe.billing.MeterEvent.OBJECT_NAME: stripe.billing.MeterEvent, stripe.billing.MeterEventAdjustment.OBJECT_NAME: stripe.billing.MeterEventAdjustment, @@ -78,6 +81,7 @@ stripe.LineItem.OBJECT_NAME: stripe.LineItem, stripe.LoginLink.OBJECT_NAME: stripe.LoginLink, stripe.Mandate.OBJECT_NAME: stripe.Mandate, + stripe.Margin.OBJECT_NAME: stripe.Margin, stripe.PaymentIntent.OBJECT_NAME: stripe.PaymentIntent, stripe.PaymentLink.OBJECT_NAME: stripe.PaymentLink, stripe.PaymentMethod.OBJECT_NAME: stripe.PaymentMethod, @@ -144,3 +148,12 @@ stripe.WebhookEndpoint.OBJECT_NAME: stripe.WebhookEndpoint, # Object classes: The end of the section generated from our OpenAPI spec } + +V2_OBJECT_CLASSES = { + # V2 Object classes: The beginning of the section generated from our OpenAPI spec + stripe.v2.billing.MeterEvent.OBJECT_NAME: stripe.v2.billing.MeterEvent, + stripe.v2.billing.MeterEventAdjustment.OBJECT_NAME: stripe.v2.billing.MeterEventAdjustment, + stripe.v2.billing.MeterEventSession.OBJECT_NAME: stripe.v2.billing.MeterEventSession, + stripe.v2.Event.OBJECT_NAME: stripe.v2.Event, + # V2 Object classes: The end of the section generated from our OpenAPI spec +} diff --git a/stripe/_product.py b/stripe/_product.py index ea3cda794..4bda6d1ca 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -176,6 +176,12 @@ class CreateParamsDefaultPriceData(TypedDict): """ Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ + custom_unit_amount: NotRequired[ + "Product.CreateParamsDefaultPriceDataCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ recurring: NotRequired["Product.CreateParamsDefaultPriceDataRecurring"] """ The recurring components of a price such as `interval` and `interval_count`. @@ -188,7 +194,7 @@ class CreateParamsDefaultPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. """ unit_amount_decimal: NotRequired[str] """ @@ -265,6 +271,24 @@ class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. """ + class CreateParamsDefaultPriceDataCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + class CreateParamsDefaultPriceDataRecurring(TypedDict): interval: Literal["day", "month", "week", "year"] """ diff --git a/stripe/_product_service.py b/stripe/_product_service.py index 817c190b6..3e1b632c2 100644 --- a/stripe/_product_service.py +++ b/stripe/_product_service.py @@ -105,6 +105,12 @@ class CreateParamsDefaultPriceData(TypedDict): """ Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ + custom_unit_amount: NotRequired[ + "ProductService.CreateParamsDefaultPriceDataCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ recurring: NotRequired[ "ProductService.CreateParamsDefaultPriceDataRecurring" ] @@ -119,7 +125,7 @@ class CreateParamsDefaultPriceData(TypedDict): """ unit_amount: NotRequired[int] """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. """ unit_amount_decimal: NotRequired[str] """ @@ -198,6 +204,24 @@ class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. """ + class CreateParamsDefaultPriceDataCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + class CreateParamsDefaultPriceDataRecurring(TypedDict): interval: Literal["day", "month", "week", "year"] """ diff --git a/stripe/_promotion_code.py b/stripe/_promotion_code.py index 13fb3c528..e11786c09 100644 --- a/stripe/_promotion_code.py +++ b/stripe/_promotion_code.py @@ -67,7 +67,9 @@ class CreateParams(RequestOptions): """ code: NotRequired[str] """ - The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. + The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + + If left blank, we will generate one automatically. """ coupon: str """ @@ -224,7 +226,7 @@ class RetrieveParams(RequestOptions): """ code: str """ - The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. + The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). """ coupon: "Coupon" """ diff --git a/stripe/_promotion_code_service.py b/stripe/_promotion_code_service.py index b3eeed7b3..4da95a810 100644 --- a/stripe/_promotion_code_service.py +++ b/stripe/_promotion_code_service.py @@ -17,7 +17,9 @@ class CreateParams(TypedDict): """ code: NotRequired[str] """ - The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. + The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + + If left blank, we will generate one automatically. """ coupon: str """ diff --git a/stripe/_request_options.py b/stripe/_request_options.py index caa26fa50..e97cf1e1c 100644 --- a/stripe/_request_options.py +++ b/stripe/_request_options.py @@ -7,6 +7,7 @@ class RequestOptions(TypedDict): api_key: NotRequired["str|None"] stripe_version: NotRequired["str|None"] stripe_account: NotRequired["str|None"] + stripe_context: NotRequired["str|None"] max_network_retries: NotRequired["int|None"] idempotency_key: NotRequired["str|None"] content_type: NotRequired["str|None"] @@ -25,6 +26,7 @@ def merge_options( return { "api_key": requestor.api_key, "stripe_account": requestor.stripe_account, + "stripe_context": requestor.stripe_context, "stripe_version": requestor.stripe_version, "max_network_retries": requestor.max_network_retries, "idempotency_key": None, @@ -36,6 +38,8 @@ def merge_options( "api_key": request.get("api_key") or requestor.api_key, "stripe_account": request.get("stripe_account") or requestor.stripe_account, + "stripe_context": request.get("stripe_context") + or requestor.stripe_context, "stripe_version": request.get("stripe_version") or requestor.stripe_version, "max_network_retries": request.get("max_network_retries") @@ -62,6 +66,7 @@ def extract_options_from_dict( "api_key", "stripe_version", "stripe_account", + "stripe_context", "max_network_retries", "idempotency_key", "content_type", diff --git a/stripe/_requestor_options.py b/stripe/_requestor_options.py index 1314a8a71..6f8ebb328 100644 --- a/stripe/_requestor_options.py +++ b/stripe/_requestor_options.py @@ -8,6 +8,7 @@ class RequestorOptions(object): api_key: Optional[str] stripe_account: Optional[str] + stripe_context: Optional[str] stripe_version: Optional[str] base_addresses: BaseAddresses max_network_retries: Optional[int] @@ -16,12 +17,14 @@ def __init__( self, api_key: Optional[str] = None, stripe_account: Optional[str] = None, + stripe_context: Optional[str] = None, stripe_version: Optional[str] = None, base_addresses: BaseAddresses = {}, max_network_retries: Optional[int] = None, ): self.api_key = api_key self.stripe_account = stripe_account + self.stripe_context = stripe_context self.stripe_version = stripe_version self.base_addresses = {} @@ -33,6 +36,10 @@ def __init__( self.base_addresses["connect"] = base_addresses.get("connect") if base_addresses.get("files") is not None: self.base_addresses["files"] = base_addresses.get("files") + if base_addresses.get("meter_events") is not None: + self.base_addresses["meter_events"] = base_addresses.get( + "meter_events" + ) self.max_network_retries = max_network_retries @@ -43,6 +50,7 @@ def to_dict(self): return { "api_key": self.api_key, "stripe_account": self.stripe_account, + "stripe_context": self.stripe_context, "stripe_version": self.stripe_version, "base_addresses": self.base_addresses, "max_network_retries": self.max_network_retries, @@ -59,6 +67,7 @@ def base_addresses(self): "api": stripe.api_base, "connect": stripe.connect_api_base, "files": stripe.upload_api_base, + "meter_events": stripe.meter_events_api_base, } @property @@ -73,6 +82,10 @@ def stripe_version(self): def stripe_account(self): return None + @property + def stripe_context(self): + return None + @property def max_network_retries(self): return stripe.max_network_retries diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index 8f52c2da8..661c018b1 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -7,10 +7,13 @@ DEFAULT_API_BASE, DEFAULT_CONNECT_API_BASE, DEFAULT_UPLOAD_API_BASE, + DEFAULT_METER_EVENTS_API_BASE, ) +from stripe._api_mode import ApiMode from stripe._error import AuthenticationError from stripe._api_requestor import _APIRequestor +from stripe._request_options import extract_options_from_dict from stripe._requestor_options import RequestorOptions, BaseAddresses from stripe._client_options import _ClientOptions from stripe._http_client import ( @@ -19,10 +22,14 @@ new_http_client_async_fallback, ) from stripe._api_version import _ApiVersion +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import _convert_to_stripe_object, get_api_mode from stripe._webhook import Webhook, WebhookSignature from stripe._event import Event +from stripe.v2._event import ThinEvent -from typing import Optional, Union, cast +from typing import Any, Dict, Optional, Union, cast # Non-generated services from stripe._oauth_service import OAuthService @@ -100,6 +107,7 @@ from stripe._transfer_service import TransferService from stripe._treasury_service import TreasuryService from stripe._webhook_endpoint_service import WebhookEndpointService +from stripe._v2_services import V2Services # services: The end of the section generated from our OpenAPI spec @@ -109,6 +117,7 @@ def __init__( api_key: str, *, stripe_account: Optional[str] = None, + stripe_context: Optional[str] = None, stripe_version: Optional[str] = None, base_addresses: BaseAddresses = {}, client_id: Optional[str] = None, @@ -140,12 +149,14 @@ def __init__( "api": DEFAULT_API_BASE, "connect": DEFAULT_CONNECT_API_BASE, "files": DEFAULT_UPLOAD_API_BASE, + "meter_events": DEFAULT_METER_EVENTS_API_BASE, **base_addresses, } requestor_options = RequestorOptions( api_key=api_key, stripe_account=stripe_account, + stripe_context=stripe_context, stripe_version=stripe_version or _ApiVersion.CURRENT, base_addresses=base_addresses, max_network_retries=max_network_retries, @@ -252,9 +263,27 @@ def __init__( self.transfers = TransferService(self._requestor) self.treasury = TreasuryService(self._requestor) self.webhook_endpoints = WebhookEndpointService(self._requestor) + self.v2 = V2Services(self._requestor) # top-level services: The end of the section generated from our OpenAPI spec - def construct_event( + def parse_thin_event( + self, + raw: Union[bytes, str, bytearray], + sig_header: str, + secret: str, + tolerance: int = Webhook.DEFAULT_TOLERANCE, + ) -> ThinEvent: + payload = ( + cast(Union[bytes, bytearray], raw).decode("utf-8") + if hasattr(raw, "decode") + else cast(str, raw) + ) + + WebhookSignature.verify_header(payload, sig_header, secret, tolerance) + + return ThinEvent(payload) + + def parse_snapshot_event( self, payload: Union[bytes, str], sig_header: str, @@ -274,3 +303,68 @@ def construct_event( ) return event + + def raw_request(self, method_: str, url_: str, **params): + params = params.copy() + options, params = extract_options_from_dict(params) + api_mode = get_api_mode(url_) + base_address = params.pop("base", "api") + + stripe_context = params.pop("stripe_context", None) + + # stripe-context goes *here* and not in api_requestor. Properties + # go on api_requestor when you want them to persist onto requests + # made when you call instance methods on APIResources that come from + # the first request. No need for that here, as we aren't deserializing APIResources + if stripe_context is not None: + options["headers"] = options.get("headers", {}) + assert isinstance(options["headers"], dict) + options["headers"].update({"Stripe-Context": stripe_context}) + + rbody, rcode, rheaders = self._requestor.request_raw( + method_, + url_, + params=params, + options=options, + base_address=base_address, + api_mode=api_mode, + usage=["raw_request"], + ) + + return self._requestor._interpret_response( + rbody, rcode, rheaders, api_mode + ) + + async def raw_request_async(self, method_: str, url_: str, **params): + params = params.copy() + options, params = extract_options_from_dict(params) + api_mode = get_api_mode(url_) + base_address = params.pop("base", "api") + + rbody, rcode, rheaders = await self._requestor.request_raw_async( + method_, + url_, + params=params, + options=options, + base_address=base_address, + api_mode=api_mode, + usage=["raw_request"], + ) + + return self._requestor._interpret_response( + rbody, rcode, rheaders, api_mode + ) + + def deserialize( + self, + resp: Union[StripeResponse, Dict[str, Any]], + params: Optional[Dict[str, Any]] = None, + *, + api_mode: ApiMode, + ) -> StripeObject: + return _convert_to_stripe_object( + resp=resp, + params=params, + requestor=self._requestor, + api_mode=api_mode, + ) diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index 2cc00104d..e8fd042e6 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -81,8 +81,6 @@ class StripeObject(Dict[str, Any]): class _ReprJSONEncoder(json.JSONEncoder): def default(self, o: Any) -> Any: if isinstance(o, datetime.datetime): - # pyright complains that _encode_datetime is "private", but it's - # private to outsiders, not to stripe_object return _encode_datetime(o) return super(StripeObject._ReprJSONEncoder, self).default(o) diff --git a/stripe/_subscription.py b/stripe/_subscription.py index ad418161e..93c9edeb6 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -2270,11 +2270,11 @@ def _cls_cancel( **params: Unpack["Subscription.CancelParams"], ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( "Subscription", @@ -2296,11 +2296,11 @@ def cancel( **params: Unpack["Subscription.CancelParams"], ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ ... @@ -2309,11 +2309,11 @@ def cancel( self, **params: Unpack["Subscription.CancelParams"] ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ ... @@ -2322,11 +2322,11 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Subscription.CancelParams"] ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( "Subscription", @@ -2346,11 +2346,11 @@ async def _cls_cancel_async( **params: Unpack["Subscription.CancelParams"], ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( "Subscription", @@ -2372,11 +2372,11 @@ async def cancel_async( **params: Unpack["Subscription.CancelParams"], ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ ... @@ -2385,11 +2385,11 @@ async def cancel_async( self, **params: Unpack["Subscription.CancelParams"] ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ ... @@ -2398,11 +2398,11 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Subscription.CancelParams"] ) -> "Subscription": """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( "Subscription", diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index e034f9751..adad3f820 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -1647,11 +1647,11 @@ def cancel( options: RequestOptions = {}, ) -> Subscription: """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( Subscription, @@ -1675,11 +1675,11 @@ async def cancel_async( options: RequestOptions = {}, ) -> Subscription: """ - Cancels a customer's subscription immediately. The customer will not be charged again for the subscription. + Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). - Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. + Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. - By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ return cast( Subscription, diff --git a/stripe/_util.py b/stripe/_util.py index 6458d70a7..2ef97e7c2 100644 --- a/stripe/_util.py +++ b/stripe/_util.py @@ -192,8 +192,19 @@ def secure_compare(val1, val2): return result == 0 -def get_object_classes(): +def get_thin_event_classes(): + from stripe.events._event_classes import THIN_EVENT_CLASSES + + return THIN_EVENT_CLASSES + + +def get_object_classes(api_mode): # This is here to avoid a circular dependency + if api_mode == "V2": + from stripe._object_classes import V2_OBJECT_CLASSES + + return V2_OBJECT_CLASSES + from stripe._object_classes import OBJECT_CLASSES return OBJECT_CLASSES @@ -310,7 +321,20 @@ def _convert_to_stripe_object( resp = resp.copy() klass_name = resp.get("object") if isinstance(klass_name, str): - klass = get_object_classes().get(klass_name, StripeObject) + if api_mode == "V2" and klass_name == "v2.core.event": + event_name = resp.get("type", "") + klass = get_thin_event_classes().get( + event_name, stripe.StripeObject + ) + else: + klass = get_object_classes(api_mode).get( + klass_name, stripe.StripeObject + ) + # TODO: this is a horrible hack. The API needs + # to return something for `object` here. + + elif "data" in resp and "next_page_url" in resp: + klass = stripe.v2.ListObject elif klass_ is not None: klass = klass_ else: @@ -393,6 +417,13 @@ def sanitize_id(id): return quotedId +def get_api_mode(url): + if url.startswith("/v2"): + return "V2" + else: + return "V1" + + class class_method_variant(object): def __init__(self, class_method_name): self.class_method_name = class_method_name diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py new file mode 100644 index 000000000..93e3e7064 --- /dev/null +++ b/stripe/_v2_services.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe.v2._billing_service import BillingService +from stripe.v2._core_service import CoreService + + +class V2Services(StripeService): + def __init__(self, requestor): + super().__init__(requestor) + self.billing = BillingService(self._requestor) + self.core = CoreService(self._requestor) diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index 9fc7bcb79..bd4140848 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -134,6 +134,7 @@ class CreateParams(RequestOptions): "2023-10-16", "2024-04-10", "2024-06-20", + "2024-09-30.acacia", ] ] """ diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 2acb57b8c..c29a6db8c 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -115,6 +115,7 @@ class CreateParams(TypedDict): "2023-10-16", "2024-04-10", "2024-06-20", + "2024-09-30.acacia", ] ] """ diff --git a/stripe/api_resources/__init__.py b/stripe/api_resources/__init__.py index 99bf65826..d142b58af 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -85,6 +85,7 @@ from stripe.api_resources.list_object import ListObject from stripe.api_resources.login_link import LoginLink from stripe.api_resources.mandate import Mandate + from stripe.api_resources.margin import Margin from stripe.api_resources.payment_intent import PaymentIntent from stripe.api_resources.payment_link import PaymentLink from stripe.api_resources.payment_method import PaymentMethod diff --git a/stripe/api_resources/billing/__init__.py b/stripe/api_resources/billing/__init__.py index e469ff8d7..3375658a4 100644 --- a/stripe/api_resources/billing/__init__.py +++ b/stripe/api_resources/billing/__init__.py @@ -18,6 +18,13 @@ if not TYPE_CHECKING: from stripe.api_resources.billing.alert import Alert from stripe.api_resources.billing.alert_triggered import AlertTriggered + from stripe.api_resources.billing.credit_balance_summary import ( + CreditBalanceSummary, + ) + from stripe.api_resources.billing.credit_balance_transaction import ( + CreditBalanceTransaction, + ) + from stripe.api_resources.billing.credit_grant import CreditGrant from stripe.api_resources.billing.meter import Meter from stripe.api_resources.billing.meter_event import MeterEvent from stripe.api_resources.billing.meter_event_adjustment import ( diff --git a/stripe/api_resources/billing/credit_balance_summary.py b/stripe/api_resources/billing/credit_balance_summary.py new file mode 100644 index 000000000..48e8754c2 --- /dev/null +++ b/stripe/api_resources/billing/credit_balance_summary.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.credit_balance_summary package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.credit_balance_summary import CreditBalanceSummary + To: + from stripe.billing import CreditBalanceSummary + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._credit_balance_summary import ( # noqa + CreditBalanceSummary, + ) diff --git a/stripe/api_resources/billing/credit_balance_transaction.py b/stripe/api_resources/billing/credit_balance_transaction.py new file mode 100644 index 000000000..8797820ad --- /dev/null +++ b/stripe/api_resources/billing/credit_balance_transaction.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.credit_balance_transaction package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.credit_balance_transaction import CreditBalanceTransaction + To: + from stripe.billing import CreditBalanceTransaction + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._credit_balance_transaction import ( # noqa + CreditBalanceTransaction, + ) diff --git a/stripe/api_resources/billing/credit_grant.py b/stripe/api_resources/billing/credit_grant.py new file mode 100644 index 000000000..4d50815d7 --- /dev/null +++ b/stripe/api_resources/billing/credit_grant.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.credit_grant package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.credit_grant import CreditGrant + To: + from stripe.billing import CreditGrant + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._credit_grant import ( # noqa + CreditGrant, + ) diff --git a/stripe/api_resources/margin.py b/stripe/api_resources/margin.py new file mode 100644 index 000000000..2a94240be --- /dev/null +++ b/stripe/api_resources/margin.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.margin package is deprecated, please change your + imports to import from stripe directly. + From: + from stripe.api_resources.margin import Margin + To: + from stripe import Margin + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe._margin import ( # noqa + Margin, + ) diff --git a/stripe/billing/__init__.py b/stripe/billing/__init__.py index a6aea1532..29a9770a6 100644 --- a/stripe/billing/__init__.py +++ b/stripe/billing/__init__.py @@ -3,6 +3,22 @@ from stripe.billing._alert import Alert as Alert from stripe.billing._alert_service import AlertService as AlertService from stripe.billing._alert_triggered import AlertTriggered as AlertTriggered +from stripe.billing._credit_balance_summary import ( + CreditBalanceSummary as CreditBalanceSummary, +) +from stripe.billing._credit_balance_summary_service import ( + CreditBalanceSummaryService as CreditBalanceSummaryService, +) +from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction as CreditBalanceTransaction, +) +from stripe.billing._credit_balance_transaction_service import ( + CreditBalanceTransactionService as CreditBalanceTransactionService, +) +from stripe.billing._credit_grant import CreditGrant as CreditGrant +from stripe.billing._credit_grant_service import ( + CreditGrantService as CreditGrantService, +) from stripe.billing._meter import Meter as Meter from stripe.billing._meter_event import MeterEvent as MeterEvent from stripe.billing._meter_event_adjustment import ( diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 02aecb7da..0141ba0e7 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -28,13 +28,18 @@ class Alert(CreateableAPIResource["Alert"], ListableAPIResource["Alert"]): OBJECT_NAME: ClassVar[Literal["billing.alert"]] = "billing.alert" - class Filter(StripeObject): - customer: Optional[ExpandableField["Customer"]] + class UsageThreshold(StripeObject): + class Filter(StripeObject): + customer: Optional[ExpandableField["Customer"]] + """ + Limit the scope of the alert to this customer ID + """ + type: Literal["customer"] + + filters: Optional[List[Filter]] """ - Limit the scope of the alert to this customer ID + The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. """ - - class UsageThresholdConfig(StripeObject): gte: int """ The value at which this alert will trigger. @@ -47,6 +52,7 @@ class UsageThresholdConfig(StripeObject): """ Defines how the alert will behave. """ + _inner_class_types = {"filters": Filter} class ActivateParams(RequestOptions): expand: NotRequired[List[str]] @@ -69,36 +75,20 @@ class CreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - filter: NotRequired["Alert.CreateParamsFilter"] - """ - Filters to limit the scope of an alert. - """ title: str """ The title of the alert. """ - usage_threshold_config: NotRequired[ - "Alert.CreateParamsUsageThresholdConfig" - ] + usage_threshold: NotRequired["Alert.CreateParamsUsageThreshold"] """ The configuration of the usage threshold. """ - class CreateParamsFilter(TypedDict): - customer: NotRequired[str] - """ - Limit the scope to this alert only to this customer. - """ - subscription: NotRequired[str] - """ - Limit the scope of this rated usage alert to this subscription. - """ - subscription_item: NotRequired[str] + class CreateParamsUsageThreshold(TypedDict): + filters: NotRequired[List["Alert.CreateParamsUsageThresholdFilter"]] """ - Limit the scope of this rated usage alert to this subscription item. + The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. """ - - class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ Defines at which value the alert will fire. @@ -112,6 +102,16 @@ class CreateParamsUsageThresholdConfig(TypedDict): Whether the alert should only fire only once, or once per billing cycle. """ + class CreateParamsUsageThresholdFilter(TypedDict): + customer: NotRequired[str] + """ + Limit the scope to this usage alert only to this customer. + """ + type: Literal["customer"] + """ + What type of filter is being applied to this usage alert. + """ + class DeactivateParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -154,10 +154,6 @@ class RetrieveParams(RequestOptions): """ Defines the type of the alert. """ - filter: Optional[Filter] - """ - Limits the scope of the alert to a specific [customer](https://stripe.com/docs/api/customers). - """ id: str """ Unique identifier for the object. @@ -178,7 +174,7 @@ class RetrieveParams(RequestOptions): """ Title of the alert. """ - usage_threshold_config: Optional[UsageThresholdConfig] + usage_threshold: Optional[UsageThreshold] """ Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). """ @@ -587,7 +583,4 @@ async def retrieve_async( await instance.refresh_async() return instance - _inner_class_types = { - "filter": Filter, - "usage_threshold_config": UsageThresholdConfig, - } + _inner_class_types = {"usage_threshold": UsageThreshold} diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 39649a26a..457fefda8 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -31,36 +31,22 @@ class CreateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - filter: NotRequired["AlertService.CreateParamsFilter"] - """ - Filters to limit the scope of an alert. - """ title: str """ The title of the alert. """ - usage_threshold_config: NotRequired[ - "AlertService.CreateParamsUsageThresholdConfig" - ] + usage_threshold: NotRequired["AlertService.CreateParamsUsageThreshold"] """ The configuration of the usage threshold. """ - class CreateParamsFilter(TypedDict): - customer: NotRequired[str] - """ - Limit the scope to this alert only to this customer. - """ - subscription: NotRequired[str] - """ - Limit the scope of this rated usage alert to this subscription. - """ - subscription_item: NotRequired[str] + class CreateParamsUsageThreshold(TypedDict): + filters: NotRequired[ + List["AlertService.CreateParamsUsageThresholdFilter"] + ] """ - Limit the scope of this rated usage alert to this subscription item. + The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. """ - - class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ Defines at which value the alert will fire. @@ -74,6 +60,16 @@ class CreateParamsUsageThresholdConfig(TypedDict): Whether the alert should only fire only once, or once per billing cycle. """ + class CreateParamsUsageThresholdFilter(TypedDict): + customer: NotRequired[str] + """ + Limit the scope to this usage alert only to this customer. + """ + type: Literal["customer"] + """ + What type of filter is being applied to this usage alert. + """ + class DeactivateParams(TypedDict): expand: NotRequired[List[str]] """ diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py new file mode 100644 index 000000000..d91252dbf --- /dev/null +++ b/stripe/billing/_credit_balance_summary.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._expandable_field import ExpandableField +from stripe._request_options import RequestOptions +from stripe._singleton_api_resource import SingletonAPIResource +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import ( + Literal, + NotRequired, + TypedDict, + Unpack, + TYPE_CHECKING, +) + +if TYPE_CHECKING: + from stripe._customer import Customer + + +class CreditBalanceSummary(SingletonAPIResource["CreditBalanceSummary"]): + """ + Indicates the credit balance for credits granted to a customer. + """ + + OBJECT_NAME: ClassVar[Literal["billing.credit_balance_summary"]] = ( + "billing.credit_balance_summary" + ) + + class Balance(StripeObject): + class AvailableBalance(StripeObject): + class Monetary(StripeObject): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount. + """ + + monetary: Optional[Monetary] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + The type of this amount. We currently only support `monetary` credits. + """ + _inner_class_types = {"monetary": Monetary} + + class LedgerBalance(StripeObject): + class Monetary(StripeObject): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount. + """ + + monetary: Optional[Monetary] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + The type of this amount. We currently only support `monetary` credits. + """ + _inner_class_types = {"monetary": Monetary} + + available_balance: AvailableBalance + ledger_balance: LedgerBalance + _inner_class_types = { + "available_balance": AvailableBalance, + "ledger_balance": LedgerBalance, + } + + class RetrieveParams(RequestOptions): + customer: str + """ + The customer for which to fetch credit balance summary. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filter: "CreditBalanceSummary.RetrieveParamsFilter" + """ + The filter criteria for the credit balance summary. + """ + + class RetrieveParamsFilter(TypedDict): + applicability_scope: NotRequired[ + "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScope" + ] + """ + The credit applicability scope for which to fetch balance summary. + """ + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch balance summary. + """ + type: Literal["applicability_scope", "credit_grant"] + """ + Specify the type of this filter. + """ + + class RetrieveParamsFilterApplicabilityScope(TypedDict): + price_type: Literal["metered"] + """ + The price type to which credit grants can apply to. We currently only support `metered` price type. + """ + + balances: List[Balance] + """ + The credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + """ + customer: ExpandableField["Customer"] + """ + The customer the balance is for. + """ + 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["billing.credit_balance_summary"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + + @classmethod + def retrieve( + cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] + ) -> "CreditBalanceSummary": + """ + Retrieves the credit balance summary for a customer + """ + instance = cls(None, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] + ) -> "CreditBalanceSummary": + """ + Retrieves the credit balance summary for a customer + """ + instance = cls(None, **params) + await instance.refresh_async() + return instance + + @classmethod + def class_url(cls): + return "/v1/billing/credit_balance_summary" + + _inner_class_types = {"balances": Balance} diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py new file mode 100644 index 000000000..045e093b0 --- /dev/null +++ b/stripe/billing/_credit_balance_summary_service.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe.billing._credit_balance_summary import CreditBalanceSummary +from typing import List, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditBalanceSummaryService(StripeService): + class RetrieveParams(TypedDict): + customer: str + """ + The customer for which to fetch credit balance summary. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filter: "CreditBalanceSummaryService.RetrieveParamsFilter" + """ + The filter criteria for the credit balance summary. + """ + + class RetrieveParamsFilter(TypedDict): + applicability_scope: NotRequired[ + "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScope" + ] + """ + The credit applicability scope for which to fetch balance summary. + """ + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch balance summary. + """ + type: Literal["applicability_scope", "credit_grant"] + """ + Specify the type of this filter. + """ + + class RetrieveParamsFilterApplicabilityScope(TypedDict): + price_type: Literal["metered"] + """ + The price type to which credit grants can apply to. We currently only support `metered` price type. + """ + + def retrieve( + self, + params: "CreditBalanceSummaryService.RetrieveParams", + options: RequestOptions = {}, + ) -> CreditBalanceSummary: + """ + Retrieves the credit balance summary for a customer + """ + return cast( + CreditBalanceSummary, + self._request( + "get", + "/v1/billing/credit_balance_summary", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + params: "CreditBalanceSummaryService.RetrieveParams", + options: RequestOptions = {}, + ) -> CreditBalanceSummary: + """ + Retrieves the credit balance summary for a customer + """ + return cast( + CreditBalanceSummary, + await self._request_async( + "get", + "/v1/billing/credit_balance_summary", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py new file mode 100644 index 000000000..ff8de6bad --- /dev/null +++ b/stripe/billing/_credit_balance_transaction.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe.billing._credit_grant import CreditGrant + from stripe.test_helpers._test_clock import TestClock + + +class CreditBalanceTransaction( + ListableAPIResource["CreditBalanceTransaction"] +): + """ + A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + """ + + OBJECT_NAME: ClassVar[Literal["billing.credit_balance_transaction"]] = ( + "billing.credit_balance_transaction" + ) + + class Credit(StripeObject): + class Amount(StripeObject): + class Monetary(StripeObject): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount. + """ + + monetary: Optional[Monetary] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + The type of this amount. We currently only support `monetary` credits. + """ + _inner_class_types = {"monetary": Monetary} + + amount: Amount + type: Literal["credits_granted"] + """ + The type of credit transaction. + """ + _inner_class_types = {"amount": Amount} + + class Debit(StripeObject): + class Amount(StripeObject): + class Monetary(StripeObject): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount. + """ + + monetary: Optional[Monetary] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + The type of this amount. We currently only support `monetary` credits. + """ + _inner_class_types = {"monetary": Monetary} + + class CreditsApplied(StripeObject): + invoice: ExpandableField["Invoice"] + """ + The invoice to which the credits were applied. + """ + invoice_line_item: str + """ + The invoice line item to which the credits were applied. + """ + + amount: Amount + credits_applied: Optional[CreditsApplied] + """ + Details of how the credits were applied to an invoice. Only present if `type` is `credits_applied`. + """ + type: Literal["credits_applied", "credits_expired", "credits_voided"] + """ + The type of debit transaction. + """ + _inner_class_types = { + "amount": Amount, + "credits_applied": CreditsApplied, + } + + class ListParams(RequestOptions): + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch credit balance transactions. + """ + customer: str + """ + The customer for which to fetch credit balance transactions. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + credit: Optional[Credit] + """ + Credit details for this balance transaction. Only present if type is `credit`. + """ + credit_grant: ExpandableField["CreditGrant"] + """ + The credit grant associated with this balance transaction. + """ + debit: Optional[Debit] + """ + Debit details for this balance transaction. Only present if type is `debit`. + """ + effective_at: int + """ + The effective time of this balance transaction. + """ + id: str + """ + Unique identifier for the object. + """ + 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["billing.credit_balance_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this credit balance transaction belongs to. + """ + type: Optional[Literal["credit", "debit"]] + """ + The type of balance transaction (credit or debit). + """ + + @classmethod + def list( + cls, **params: Unpack["CreditBalanceTransaction.ListParams"] + ) -> ListObject["CreditBalanceTransaction"]: + """ + Retrieve a list of credit balance transactions + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["CreditBalanceTransaction.ListParams"] + ) -> ListObject["CreditBalanceTransaction"]: + """ + Retrieve a list of credit balance transactions + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, + id: str, + **params: Unpack["CreditBalanceTransaction.RetrieveParams"], + ) -> "CreditBalanceTransaction": + """ + Retrieves a credit balance transaction + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, + id: str, + **params: Unpack["CreditBalanceTransaction.RetrieveParams"], + ) -> "CreditBalanceTransaction": + """ + Retrieves a credit balance transaction + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = {"credit": Credit, "debit": Debit} diff --git a/stripe/billing/_credit_balance_transaction_service.py b/stripe/billing/_credit_balance_transaction_service.py new file mode 100644 index 000000000..102258473 --- /dev/null +++ b/stripe/billing/_credit_balance_transaction_service.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._list_object import ListObject +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.billing._credit_balance_transaction import CreditBalanceTransaction +from typing import List, cast +from typing_extensions import NotRequired, TypedDict + + +class CreditBalanceTransactionService(StripeService): + class ListParams(TypedDict): + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch credit balance transactions. + """ + customer: str + """ + The customer for which to fetch credit balance transactions. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def list( + self, + params: "CreditBalanceTransactionService.ListParams", + options: RequestOptions = {}, + ) -> ListObject[CreditBalanceTransaction]: + """ + Retrieve a list of credit balance transactions + """ + return cast( + ListObject[CreditBalanceTransaction], + self._request( + "get", + "/v1/billing/credit_balance_transactions", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "CreditBalanceTransactionService.ListParams", + options: RequestOptions = {}, + ) -> ListObject[CreditBalanceTransaction]: + """ + Retrieve a list of credit balance transactions + """ + return cast( + ListObject[CreditBalanceTransaction], + await self._request_async( + "get", + "/v1/billing/credit_balance_transactions", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "CreditBalanceTransactionService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> CreditBalanceTransaction: + """ + Retrieves a credit balance transaction + """ + return cast( + CreditBalanceTransaction, + self._request( + "get", + "/v1/billing/credit_balance_transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "CreditBalanceTransactionService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> CreditBalanceTransaction: + """ + Retrieves a credit balance transaction + """ + return cast( + CreditBalanceTransaction, + await self._request_async( + "get", + "/v1/billing/credit_balance_transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py new file mode 100644 index 000000000..51858796d --- /dev/null +++ b/stripe/billing/_credit_grant.py @@ -0,0 +1,599 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject +from stripe._updateable_api_resource import UpdateableAPIResource +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, Dict, List, Optional, cast, overload +from typing_extensions import ( + Literal, + NotRequired, + TypedDict, + Unpack, + TYPE_CHECKING, +) + +if TYPE_CHECKING: + from stripe._customer import Customer + from stripe.test_helpers._test_clock import TestClock + + +class CreditGrant( + CreateableAPIResource["CreditGrant"], + ListableAPIResource["CreditGrant"], + UpdateableAPIResource["CreditGrant"], +): + """ + A credit grant is a resource that records a grant of some credit to a customer. + """ + + OBJECT_NAME: ClassVar[Literal["billing.credit_grant"]] = ( + "billing.credit_grant" + ) + + class Amount(StripeObject): + class Monetary(StripeObject): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount. + """ + + monetary: Optional[Monetary] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + The type of this amount. We currently only support `monetary` credits. + """ + _inner_class_types = {"monetary": Monetary} + + class ApplicabilityConfig(StripeObject): + class Scope(StripeObject): + price_type: Literal["metered"] + """ + The price type to which credit grants can apply to. We currently only support `metered` price type. + """ + + scope: Scope + _inner_class_types = {"scope": Scope} + + class CreateParams(RequestOptions): + amount: "CreditGrant.CreateParamsAmount" + """ + Amount of this credit grant. + """ + applicability_config: "CreditGrant.CreateParamsApplicabilityConfig" + """ + Configuration specifying what this credit grant applies to. + """ + category: Literal["paid", "promotional"] + """ + The category of this credit grant. + """ + customer: str + """ + Id of the customer to whom the credit should be granted. + """ + effective_at: NotRequired[int] + """ + The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The time when the credit will expire. If not specified, the credit will never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + """ + name: NotRequired[str] + """ + A descriptive name shown in dashboard and on invoices. + """ + + class CreateParamsAmount(TypedDict): + monetary: NotRequired["CreditGrant.CreateParamsAmountMonetary"] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + Specify the type of this amount. We currently only support `monetary` credits. + """ + + class CreateParamsAmountMonetary(TypedDict): + currency: str + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + """ + value: int + """ + A positive integer representing the amount of the credit grant. + """ + + class CreateParamsApplicabilityConfig(TypedDict): + scope: "CreditGrant.CreateParamsApplicabilityConfigScope" + """ + Specify the scope of this applicability config. + """ + + class CreateParamsApplicabilityConfigScope(TypedDict): + price_type: Literal["metered"] + """ + The price type to which credit grants can apply to. We currently only support `metered` price type. + """ + + class ExpireParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(RequestOptions): + customer: NotRequired[str] + """ + Only return credit grants for this customer. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class ModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class VoidGrantParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + amount: Amount + applicability_config: ApplicabilityConfig + category: Literal["paid", "promotional"] + """ + The category of this credit grant. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + customer: ExpandableField["Customer"] + """ + Id of the customer to whom the credit was granted. + """ + effective_at: Optional[int] + """ + The time when the credit becomes effective i.e when it is eligible to be used. + """ + expires_at: Optional[int] + """ + The time when the credit will expire. If not present, the credit will never expire. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + name: Optional[str] + """ + A descriptive name shown in dashboard and on invoices. + """ + object: Literal["billing.credit_grant"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this credit grant belongs to. + """ + updated: int + """ + Time at which the object was last updated. Measured in seconds since the Unix epoch. + """ + voided_at: Optional[int] + """ + The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + """ + + @classmethod + def create( + cls, **params: Unpack["CreditGrant.CreateParams"] + ) -> "CreditGrant": + """ + Creates a credit grant + """ + return cast( + "CreditGrant", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["CreditGrant.CreateParams"] + ) -> "CreditGrant": + """ + Creates a credit grant + """ + return cast( + "CreditGrant", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def _cls_expire( + cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + return cast( + "CreditGrant", + cls._static_request( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def expire( + id: str, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + ... + + @overload + def expire( + self, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + ... + + @class_method_variant("_cls_expire") + def expire( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + return cast( + "CreditGrant", + self._request( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_expire_async( + cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + return cast( + "CreditGrant", + await cls._static_request_async( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def expire_async( + id: str, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + ... + + @overload + async def expire_async( + self, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + ... + + @class_method_variant("_cls_expire_async") + async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["CreditGrant.ExpireParams"] + ) -> "CreditGrant": + """ + Expires a credit grant + """ + return cast( + "CreditGrant", + await self._request_async( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["CreditGrant.ListParams"] + ) -> ListObject["CreditGrant"]: + """ + Retrieve a list of credit grants + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["CreditGrant.ListParams"] + ) -> ListObject["CreditGrant"]: + """ + Retrieve a list of credit grants + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def modify( + cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] + ) -> "CreditGrant": + """ + Updates a credit grant + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "CreditGrant", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] + ) -> "CreditGrant": + """ + Updates a credit grant + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "CreditGrant", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] + ) -> "CreditGrant": + """ + Retrieves a credit grant + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] + ) -> "CreditGrant": + """ + Retrieves a credit grant + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def _cls_void_grant( + cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + return cast( + "CreditGrant", + cls._static_request( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def void_grant( + id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + ... + + @overload + def void_grant( + self, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + ... + + @class_method_variant("_cls_void_grant") + def void_grant( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + return cast( + "CreditGrant", + self._request( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_void_grant_async( + cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + return cast( + "CreditGrant", + await cls._static_request_async( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def void_grant_async( + id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + ... + + @overload + async def void_grant_async( + self, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + ... + + @class_method_variant("_cls_void_grant_async") + async def void_grant_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["CreditGrant.VoidGrantParams"] + ) -> "CreditGrant": + """ + Voids a credit grant + """ + return cast( + "CreditGrant", + await self._request_async( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + _inner_class_types = { + "amount": Amount, + "applicability_config": ApplicabilityConfig, + } diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py new file mode 100644 index 000000000..011a189fb --- /dev/null +++ b/stripe/billing/_credit_grant_service.py @@ -0,0 +1,381 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._list_object import ListObject +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.billing._credit_grant import CreditGrant +from typing import Dict, List, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditGrantService(StripeService): + class CreateParams(TypedDict): + amount: "CreditGrantService.CreateParamsAmount" + """ + Amount of this credit grant. + """ + applicability_config: ( + "CreditGrantService.CreateParamsApplicabilityConfig" + ) + """ + Configuration specifying what this credit grant applies to. + """ + category: Literal["paid", "promotional"] + """ + The category of this credit grant. + """ + customer: str + """ + Id of the customer to whom the credit should be granted. + """ + effective_at: NotRequired[int] + """ + The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The time when the credit will expire. If not specified, the credit will never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + """ + name: NotRequired[str] + """ + A descriptive name shown in dashboard and on invoices. + """ + + class CreateParamsAmount(TypedDict): + monetary: NotRequired["CreditGrantService.CreateParamsAmountMonetary"] + """ + The monetary amount. + """ + type: Literal["monetary"] + """ + Specify the type of this amount. We currently only support `monetary` credits. + """ + + class CreateParamsAmountMonetary(TypedDict): + currency: str + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + """ + value: int + """ + A positive integer representing the amount of the credit grant. + """ + + class CreateParamsApplicabilityConfig(TypedDict): + scope: "CreditGrantService.CreateParamsApplicabilityConfigScope" + """ + Specify the scope of this applicability config. + """ + + class CreateParamsApplicabilityConfigScope(TypedDict): + price_type: Literal["metered"] + """ + The price type to which credit grants can apply to. We currently only support `metered` price type. + """ + + class ExpireParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class ListParams(TypedDict): + customer: NotRequired[str] + """ + Only return credit grants for this customer. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + class UpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + """ + + class VoidGrantParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def list( + self, + params: "CreditGrantService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[CreditGrant]: + """ + Retrieve a list of credit grants + """ + return cast( + ListObject[CreditGrant], + self._request( + "get", + "/v1/billing/credit_grants", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "CreditGrantService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[CreditGrant]: + """ + Retrieve a list of credit grants + """ + return cast( + ListObject[CreditGrant], + await self._request_async( + "get", + "/v1/billing/credit_grants", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "CreditGrantService.CreateParams", + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Creates a credit grant + """ + return cast( + CreditGrant, + self._request( + "post", + "/v1/billing/credit_grants", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "CreditGrantService.CreateParams", + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Creates a credit grant + """ + return cast( + CreditGrant, + await self._request_async( + "post", + "/v1/billing/credit_grants", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "CreditGrantService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Retrieves a credit grant + """ + return cast( + CreditGrant, + self._request( + "get", + "/v1/billing/credit_grants/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "CreditGrantService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Retrieves a credit grant + """ + return cast( + CreditGrant, + await self._request_async( + "get", + "/v1/billing/credit_grants/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + params: "CreditGrantService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Updates a credit grant + """ + return cast( + CreditGrant, + self._request( + "post", + "/v1/billing/credit_grants/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + params: "CreditGrantService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Updates a credit grant + """ + return cast( + CreditGrant, + await self._request_async( + "post", + "/v1/billing/credit_grants/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def expire( + self, + id: str, + params: "CreditGrantService.ExpireParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Expires a credit grant + """ + return cast( + CreditGrant, + self._request( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def expire_async( + self, + id: str, + params: "CreditGrantService.ExpireParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Expires a credit grant + """ + return cast( + CreditGrant, + await self._request_async( + "post", + "/v1/billing/credit_grants/{id}/expire".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def void_grant( + self, + id: str, + params: "CreditGrantService.VoidGrantParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Voids a credit grant + """ + return cast( + CreditGrant, + self._request( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def void_grant_async( + self, + id: str, + params: "CreditGrantService.VoidGrantParams" = {}, + options: RequestOptions = {}, + ) -> CreditGrant: + """ + Voids a credit grant + """ + return cast( + CreditGrant, + await self._request_async( + "post", + "/v1/billing/credit_grants/{id}/void".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 90bc5fbd2..41dd41f34 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -315,8 +315,8 @@ class CreateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): """ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: Union[ - Literal[""], List[Literal["price", "promotion_code", "quantity"]] + default_allowed_updates: NotRequired[ + "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" ] """ The types of subscription updates that are supported. When empty, subscriptions are not updateable. @@ -325,11 +325,8 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Whether the feature is enabled. """ - products: Union[ - Literal[""], - List[ - "Configuration.CreateParamsFeaturesSubscriptionUpdateProduct" - ], + products: NotRequired[ + "Literal['']|List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]" ] """ The list of up to 10 products that support subscription updates. diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 7cbc97444..9edf1db04 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -153,8 +153,8 @@ class CreateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): """ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: Union[ - Literal[""], List[Literal["price", "promotion_code", "quantity"]] + default_allowed_updates: NotRequired[ + "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" ] """ The types of subscription updates that are supported. When empty, subscriptions are not updateable. @@ -163,11 +163,8 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Whether the feature is enabled. """ - products: Union[ - Literal[""], - List[ - "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateProduct" - ], + products: NotRequired[ + "Literal['']|List[ConfigurationService.CreateParamsFeaturesSubscriptionUpdateProduct]" ] """ The list of up to 10 products that support subscription updates. diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index e6f7ba017..66bbac645 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2280,7 +2280,7 @@ class CreateParamsLineItem(TypedDict): class CreateParamsLineItemAdjustableQuantity(TypedDict): enabled: bool """ - Set to true if the quantity can be adjusted to any non-negative integer. By default customers will be able to remove the line item by setting the quantity to 0. + Set to true if the quantity can be adjusted to any non-negative integer. """ maximum: NotRequired[int] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index e1010120d..82d78f1be 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -690,7 +690,7 @@ class CreateParamsLineItem(TypedDict): class CreateParamsLineItemAdjustableQuantity(TypedDict): enabled: bool """ - Set to true if the quantity can be adjusted to any non-negative integer. By default customers will be able to remove the line item by setting the quantity to 0. + Set to true if the quantity can be adjusted to any non-negative integer. """ maximum: NotRequired[int] """ diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py new file mode 100644 index 000000000..bcf79de80 --- /dev/null +++ b/stripe/events/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.events._v1_billing_meter_error_report_triggered_event import ( + V1BillingMeterErrorReportTriggeredEvent as V1BillingMeterErrorReportTriggeredEvent, +) +from stripe.events._v1_billing_meter_no_meter_found_event import ( + V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent, +) diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py new file mode 100644 index 000000000..cfbfe23ba --- /dev/null +++ b/stripe/events/_event_classes.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.events._v1_billing_meter_error_report_triggered_event import ( + V1BillingMeterErrorReportTriggeredEvent, +) +from stripe.events._v1_billing_meter_no_meter_found_event import ( + V1BillingMeterNoMeterFoundEvent, +) + + +THIN_EVENT_CLASSES = { + V1BillingMeterErrorReportTriggeredEvent.LOOKUP_TYPE: V1BillingMeterErrorReportTriggeredEvent, + V1BillingMeterNoMeterFoundEvent.LOOKUP_TYPE: V1BillingMeterNoMeterFoundEvent, +} diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py new file mode 100644 index 000000000..f20157177 --- /dev/null +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.billing._meter import Meter +from stripe.v2._event import Event +from typing import List, cast +from typing_extensions import Literal + + +class V1BillingMeterErrorReportTriggeredEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.error_report_triggered" + type: Literal["v1.billing.meter.error_report_triggered"] + + class V1BillingMeterErrorReportTriggeredEventData(StripeObject): + class Reason(StripeObject): + class ErrorType(StripeObject): + class SampleError(StripeObject): + class Request(StripeObject): + identifier: str + """ + The request idempotency key. + """ + + error_message: str + """ + The error message. + """ + request: Request + """ + The request causes the error. + """ + _inner_class_types = {"request": Request} + + code: Literal[ + "archived_meter", + "meter_event_customer_not_found", + "meter_event_dimension_count_too_high", + "meter_event_invalid_value", + "meter_event_no_customer_defined", + "missing_dimension_payload_keys", + "no_meter", + "timestamp_in_future", + "timestamp_too_far_in_past", + ] + """ + Open Enum. + """ + error_count: int + """ + The number of errors of this type. + """ + sample_errors: List[SampleError] + """ + A list of sample errors of this type. + """ + _inner_class_types = {"sample_errors": SampleError} + + error_count: int + """ + The total error count within this window. + """ + error_types: List[ErrorType] + """ + The error details. + """ + _inner_class_types = {"error_types": ErrorType} + + developer_message_summary: str + """ + Extra field included in the event's `data` when fetched from /v2/events. + """ + reason: Reason + """ + This contains information about why meter error happens. + """ + validation_end: str + """ + The end of the window that is encapsulated by this summary. + """ + validation_start: str + """ + The start of the window that is encapsulated by this summary. + """ + _inner_class_types = {"reason": Reason} + + data: V1BillingMeterErrorReportTriggeredEventData + """ + Data for the v1.billing.meter.error_report_triggered event + """ + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> Meter: + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + Meter, + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={"stripe_account": self.context}, + ), + ) diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py new file mode 100644 index 000000000..680c094aa --- /dev/null +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._event import Event +from typing import List +from typing_extensions import Literal + + +class V1BillingMeterNoMeterFoundEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.no_meter_found" + type: Literal["v1.billing.meter.no_meter_found"] + + class V1BillingMeterNoMeterFoundEventData(StripeObject): + class Reason(StripeObject): + class ErrorType(StripeObject): + class SampleError(StripeObject): + class Request(StripeObject): + identifier: str + """ + The request idempotency key. + """ + + error_message: str + """ + The error message. + """ + request: Request + """ + The request causes the error. + """ + _inner_class_types = {"request": Request} + + code: Literal[ + "archived_meter", + "meter_event_customer_not_found", + "meter_event_dimension_count_too_high", + "meter_event_invalid_value", + "meter_event_no_customer_defined", + "missing_dimension_payload_keys", + "no_meter", + "timestamp_in_future", + "timestamp_too_far_in_past", + ] + """ + Open Enum. + """ + error_count: int + """ + The number of errors of this type. + """ + sample_errors: List[SampleError] + """ + A list of sample errors of this type. + """ + _inner_class_types = {"sample_errors": SampleError} + + error_count: int + """ + The total error count within this window. + """ + error_types: List[ErrorType] + """ + The error details. + """ + _inner_class_types = {"error_types": ErrorType} + + developer_message_summary: str + """ + Extra field included in the event's `data` when fetched from /v2/events. + """ + reason: Reason + """ + This contains information about why meter error happens. + """ + validation_end: str + """ + The end of the window that is encapsulated by this summary. + """ + validation_start: str + """ + The start of the window that is encapsulated by this summary. + """ + _inner_class_types = {"reason": Reason} + + data: V1BillingMeterNoMeterFoundEventData + """ + Data for the v1.billing.meter.no_meter_found event + """ diff --git a/stripe/tax/_settings.py b/stripe/tax/_settings.py index c8454342a..c8e64bdd4 100644 --- a/stripe/tax/_settings.py +++ b/stripe/tax/_settings.py @@ -155,7 +155,7 @@ class RetrieveParams(RequestOptions): """ status: Literal["active", "pending"] """ - The `active` status indicates you have all required settings to calculate tax. A status can transition out of `active` when new required settings are introduced. + The status of the Tax `Settings`. """ status_details: StatusDetails diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 6d7553865..c8bcaf97a 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -376,6 +376,12 @@ class ProcessPaymentIntentParams(RequestOptions): """ class ProcessPaymentIntentParamsProcessConfig(TypedDict): + allow_redisplay: NotRequired[ + Literal["always", "limited", "unspecified"] + ] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ enable_customer_cancellation: NotRequired[bool] """ Enables cancel button on transaction screens. @@ -398,9 +404,9 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(RequestOptions): - customer_consent_collected: NotRequired[bool] + allow_redisplay: Literal["always", "limited", "unspecified"] """ - Customer Consent Collected + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ expand: NotRequired[List[str]] """ diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 362d89162..271a9701f 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -103,6 +103,12 @@ class ProcessPaymentIntentParams(TypedDict): """ class ProcessPaymentIntentParamsProcessConfig(TypedDict): + allow_redisplay: NotRequired[ + Literal["always", "limited", "unspecified"] + ] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ enable_customer_cancellation: NotRequired[bool] """ Enables cancel button on transaction screens. @@ -125,9 +131,9 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(TypedDict): - customer_consent_collected: NotRequired[bool] + allow_redisplay: Literal["always", "limited", "unspecified"] """ - Customer Consent Collected + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ expand: NotRequired[List[str]] """ diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index 2e67c2832..702c42b91 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -317,7 +317,12 @@ class RetrieveParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ failure_code: Optional[ - Literal["account_closed", "account_frozen", "other"] + Literal[ + "account_closed", + "account_frozen", + "international_transaction", + "other", + ] ] """ Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py new file mode 100644 index 000000000..d8a2170e1 --- /dev/null +++ b/stripe/v2/__init__.py @@ -0,0 +1,10 @@ +from stripe.v2._list_object import ListObject as ListObject +from stripe.v2._amount import Amount as Amount, AmountParam as AmountParam + + +# The beginning of the section generated from our OpenAPI spec +from stripe.v2 import billing as billing, core as core +from stripe.v2._billing_service import BillingService as BillingService +from stripe.v2._core_service import CoreService as CoreService +from stripe.v2._event import Event as Event +# The end of the section generated from our OpenAPI spec diff --git a/stripe/v2/_amount.py b/stripe/v2/_amount.py new file mode 100644 index 000000000..97a6bf63a --- /dev/null +++ b/stripe/v2/_amount.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# NOT codegenned +from typing_extensions import TypedDict +from stripe._stripe_object import StripeObject + + +class Amount(StripeObject): + value: int + currency: str + + +class AmountParam(TypedDict): + value: int + currency: str diff --git a/stripe/v2/_billing_service.py b/stripe/v2/_billing_service.py new file mode 100644 index 000000000..77d36d39a --- /dev/null +++ b/stripe/v2/_billing_service.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe.v2.billing._meter_event_adjustment_service import ( + MeterEventAdjustmentService, +) +from stripe.v2.billing._meter_event_service import MeterEventService +from stripe.v2.billing._meter_event_session_service import ( + MeterEventSessionService, +) +from stripe.v2.billing._meter_event_stream_service import ( + MeterEventStreamService, +) + + +class BillingService(StripeService): + def __init__(self, requestor): + super().__init__(requestor) + self.meter_event_session = MeterEventSessionService(self._requestor) + self.meter_event_adjustments = MeterEventAdjustmentService( + self._requestor, + ) + self.meter_event_stream = MeterEventStreamService(self._requestor) + self.meter_events = MeterEventService(self._requestor) diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py new file mode 100644 index 000000000..96c4a6f2e --- /dev/null +++ b/stripe/v2/_core_service.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe.v2.core._event_service import EventService + + +class CoreService(StripeService): + def __init__(self, requestor): + super().__init__(requestor) + self.events = EventService(self._requestor) diff --git a/stripe/v2/_event.py b/stripe/v2/_event.py new file mode 100644 index 000000000..04c95ca8d --- /dev/null +++ b/stripe/v2/_event.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- + +import json +from typing import ClassVar, Optional + +from typing_extensions import Literal + +from stripe._stripe_object import StripeObject + +# This describes the common format for the pull payload of a V2 ThinEvent +# more specific classes will add `data` and `fetch_related_objects()` as needed + + +# The beginning of the section generated from our OpenAPI spec +class Event(StripeObject): + OBJECT_NAME: ClassVar[Literal["v2.core.event"]] = "v2.core.event" + + class Reason(StripeObject): + class Request(StripeObject): + id: str + """ + ID of the API request that caused the event. + """ + idempotency_key: str + """ + The idempotency key transmitted during the request. + """ + + type: Literal["request"] + """ + Event reason type. + """ + request: Optional[Request] + """ + Information on the API request that instigated the event. + """ + _inner_class_types = {"request": Request} + + context: Optional[str] + """ + Authentication context needed to fetch the event or related object. + """ + created: str + """ + Time at which the object was created. + """ + id: str + """ + Unique identifier for the event. + """ + 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.core.event"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + reason: Optional[Reason] + """ + Reason for the event. + """ + type: str + """ + The type of the event. + """ + _inner_class_types = {"reason": Reason} + + +# The end of the section generated from our OpenAPI spec + + +class Reason: + id: str + idempotency_key: str + + def __init__(self, d) -> None: + self.id = d["id"] + self.idempotency_key = d["idempotency_key"] + + def __repr__(self) -> str: + return f"" + + +class RelatedObject: + id: str + type: str + url: str + + def __init__(self, d) -> None: + self.id = d["id"] + self.type_ = d["type"] + self.url = d["url"] + + def __repr__(self) -> str: + return f"" + + +class ThinEvent: + """ + ThinEvent represents the json that's delivered from an Event Destination. It's a basic `dict` with no additional methods or properties. Use it to check basic information about a delivered event. If you want more details, use `stripe.v2.Event.retrieve(thin_event.id)` to fetch the full event object. + """ + + id: str + type: str + created: str + context: Optional[str] = None + related_object: Optional[RelatedObject] = None + reason: Optional[Reason] = None + + def __init__(self, payload: str) -> None: + parsed = json.loads(payload) + + self.id = parsed["id"] + self.type = parsed["type"] + self.created = parsed["created"] + self.context = parsed.get("context") + if parsed.get("related_object"): + self.related_object = RelatedObject(parsed["related_object"]) + if parsed.get("reason"): + self.reason = Reason(parsed["reason"]) + + def __repr__(self) -> str: + return f"" diff --git a/stripe/v2/_list_object.py b/stripe/v2/_list_object.py new file mode 100644 index 000000000..a9d73546c --- /dev/null +++ b/stripe/v2/_list_object.py @@ -0,0 +1,59 @@ +from stripe._stripe_object import StripeObject +from typing import List, Optional, TypeVar, Generic + + +T = TypeVar("T", bound=StripeObject) + + +class ListObject(StripeObject, Generic[T]): + """ + Represents one page of a list of V2 Stripe objects. Use `.data` to access + the objects on this page, or use + + for item in list_object.auto_paging_iter(): + # do something with item + + to iterate over this and all following pages. + """ + + OBJECT_NAME = "list" + data: List[StripeObject] + next_page_url: Optional[str] + + def __getitem__(self, k): + if isinstance(k, str): # type: ignore + return super(ListObject, self).__getitem__(k) + else: + raise KeyError( + "You tried to access the %s index, but ListObjectV2 types only " + "support string keys. (HINT: List calls return an object with " + "a 'data' (which is the data array). You likely want to call " + ".data[%s])" % (repr(k), repr(k)) + ) + + def __iter__(self): + return getattr(self, "data", []).__iter__() + + def __len__(self): + return getattr(self, "data", []).__len__() + + def __reversed__(self): + return getattr(self, "data", []).__reversed__() + + def auto_paging_iter(self): + page = self.data + next_page_url = self.next_page_url + while True: + for item in page: + yield item + if next_page_url is None: + break + + result = self._request( + "get", + next_page_url, + base_address="api", + ) + assert isinstance(result, ListObject) + page = result.data + next_page_url = result.next_page_url diff --git a/stripe/v2/billing/__init__.py b/stripe/v2/billing/__init__.py new file mode 100644 index 000000000..ff5fd91c6 --- /dev/null +++ b/stripe/v2/billing/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.billing._meter_event import MeterEvent as MeterEvent +from stripe.v2.billing._meter_event_adjustment import ( + MeterEventAdjustment as MeterEventAdjustment, +) +from stripe.v2.billing._meter_event_adjustment_service import ( + MeterEventAdjustmentService as MeterEventAdjustmentService, +) +from stripe.v2.billing._meter_event_service import ( + MeterEventService as MeterEventService, +) +from stripe.v2.billing._meter_event_session import ( + MeterEventSession as MeterEventSession, +) +from stripe.v2.billing._meter_event_session_service import ( + MeterEventSessionService as MeterEventSessionService, +) +from stripe.v2.billing._meter_event_stream_service import ( + MeterEventStreamService as MeterEventStreamService, +) diff --git a/stripe/v2/billing/_meter_event.py b/stripe/v2/billing/_meter_event.py new file mode 100644 index 000000000..ce33c36cd --- /dev/null +++ b/stripe/v2/billing/_meter_event.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Dict +from typing_extensions import Literal + + +class MeterEvent(StripeObject): + """ + Fix me empty_doc_string. + """ + + OBJECT_NAME: ClassVar[Literal["billing.meter_event"]] = ( + "billing.meter_event" + ) + created: str + """ + The creation time of this meter event. + """ + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + identifier: str + """ + A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. + """ + 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["billing.meter_event"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's + `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + `value_settings.event_payload_key` (default is `value`). Read more about the payload. + """ + timestamp: str + """ + The time of the event. Must be within the past 35 calendar days or up to + 5 minutes in the future. Defaults to current timestamp if not specified. + """ diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py new file mode 100644 index 000000000..7561e67ba --- /dev/null +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class MeterEventAdjustment(StripeObject): + OBJECT_NAME: ClassVar[Literal["billing.meter_event_adjustment"]] = ( + "billing.meter_event_adjustment" + ) + + class Cancel(StripeObject): + identifier: str + """ + Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + """ + + cancel: Cancel + """ + Specifies which event to cancel. + """ + created: str + """ + The time the adjustment was created. + """ + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + id: str + """ + The unique id of this meter event adjustment. + """ + 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["billing.meter_event_adjustment"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Literal["complete", "pending"] + """ + Open Enum. The meter event adjustment's status. + """ + type: Literal["cancel"] + """ + Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + """ + _inner_class_types = {"cancel": Cancel} diff --git a/stripe/v2/billing/_meter_event_adjustment_service.py b/stripe/v2/billing/_meter_event_adjustment_service.py new file mode 100644 index 000000000..9533243f8 --- /dev/null +++ b/stripe/v2/billing/_meter_event_adjustment_service.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe.v2.billing._meter_event_adjustment import MeterEventAdjustment +from typing import cast +from typing_extensions import Literal, TypedDict + + +class MeterEventAdjustmentService(StripeService): + class CreateParams(TypedDict): + cancel: "MeterEventAdjustmentService.CreateParamsCancel" + """ + Specifies which event to cancel. + """ + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + type: Literal["cancel"] + """ + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + """ + + class CreateParamsCancel(TypedDict): + identifier: str + """ + Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + """ + + def create( + self, + params: "MeterEventAdjustmentService.CreateParams", + options: RequestOptions = {}, + ) -> MeterEventAdjustment: + """ + Creates a meter event adjustment to cancel a previously sent meter event. + """ + return cast( + MeterEventAdjustment, + self._request( + "post", + "/v2/billing/meter_event_adjustments", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "MeterEventAdjustmentService.CreateParams", + options: RequestOptions = {}, + ) -> MeterEventAdjustment: + """ + Creates a meter event adjustment to cancel a previously sent meter event. + """ + return cast( + MeterEventAdjustment, + await self._request_async( + "post", + "/v2/billing/meter_event_adjustments", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/billing/_meter_event_service.py b/stripe/v2/billing/_meter_event_service.py new file mode 100644 index 000000000..50eb75009 --- /dev/null +++ b/stripe/v2/billing/_meter_event_service.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe.v2.billing._meter_event import MeterEvent +from typing import Dict, cast +from typing_extensions import NotRequired, TypedDict + + +class MeterEventService(StripeService): + class CreateParams(TypedDict): + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + identifier: NotRequired[str] + """ + A unique identifier for the event. If not provided, one will be generated. + We recommend using a globally unique identifier for this. We'll enforce + uniqueness within a rolling 24 hour period. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's + `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + `value_settings.event_payload_key` (default is `value`). Read more about + the + [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + """ + timestamp: NotRequired[str] + """ + The time of the event. Must be within the past 35 calendar days or up to + 5 minutes in the future. Defaults to current timestamp if not specified. + """ + + def create( + self, + params: "MeterEventService.CreateParams", + options: RequestOptions = {}, + ) -> MeterEvent: + """ + Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. + """ + return cast( + MeterEvent, + self._request( + "post", + "/v2/billing/meter_events", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "MeterEventService.CreateParams", + options: RequestOptions = {}, + ) -> MeterEvent: + """ + Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. + """ + return cast( + MeterEvent, + await self._request_async( + "post", + "/v2/billing/meter_events", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/billing/_meter_event_session.py b/stripe/v2/billing/_meter_event_session.py new file mode 100644 index 000000000..f1d96650e --- /dev/null +++ b/stripe/v2/billing/_meter_event_session.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class MeterEventSession(StripeObject): + OBJECT_NAME: ClassVar[Literal["billing.meter_event_session"]] = ( + "billing.meter_event_session" + ) + authentication_token: str + """ + The authentication token for this session. Use this token when calling the + high-throughput meter event API. + """ + created: str + """ + The creation time of this session. + """ + expires_at: str + """ + The time at which this session will expire. + """ + id: str + """ + The unique id of this auth session. + """ + 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["billing.meter_event_session"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ diff --git a/stripe/v2/billing/_meter_event_session_service.py b/stripe/v2/billing/_meter_event_session_service.py new file mode 100644 index 000000000..600c80362 --- /dev/null +++ b/stripe/v2/billing/_meter_event_session_service.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe.v2.billing._meter_event_session import MeterEventSession +from typing import cast +from typing_extensions import TypedDict + + +class MeterEventSessionService(StripeService): + class CreateParams(TypedDict): + pass + + def create( + self, + params: "MeterEventSessionService.CreateParams" = {}, + options: RequestOptions = {}, + ) -> MeterEventSession: + """ + Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + """ + return cast( + MeterEventSession, + self._request( + "post", + "/v2/billing/meter_event_session", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "MeterEventSessionService.CreateParams" = {}, + options: RequestOptions = {}, + ) -> MeterEventSession: + """ + Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + """ + return cast( + MeterEventSession, + await self._request_async( + "post", + "/v2/billing/meter_event_session", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/billing/_meter_event_stream_service.py b/stripe/v2/billing/_meter_event_stream_service.py new file mode 100644 index 000000000..84e6908e5 --- /dev/null +++ b/stripe/v2/billing/_meter_event_stream_service.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class MeterEventStreamService(StripeService): + class CreateParams(TypedDict): + events: List["MeterEventStreamService.CreateParamsEvent"] + """ + List of meter events to include in the request. + """ + + class CreateParamsEvent(TypedDict): + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + identifier: NotRequired[str] + """ + A unique identifier for the event. If not provided, one will be generated. + We recommend using a globally unique identifier for this. We'll enforce + uniqueness within a rolling 24 hour period. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's + `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + `value_settings.event_payload_key` (default is `value`). Read more about + the + [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + """ + timestamp: NotRequired[str] + """ + The time of the event. Must be within the past 35 calendar days or up to + 5 minutes in the future. Defaults to current timestamp if not specified. + """ + + def create( + self, + params: "MeterEventStreamService.CreateParams", + options: RequestOptions = {}, + ) -> None: + """ + Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. + """ + self._request( + "post", + "/v2/billing/meter_event_stream", + base_address="meter_events", + params=params, + options=options, + ) + + async def create_async( + self, + params: "MeterEventStreamService.CreateParams", + options: RequestOptions = {}, + ) -> None: + """ + Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. + """ + await self._request_async( + "post", + "/v2/billing/meter_event_stream", + base_address="meter_events", + params=params, + options=options, + ) diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py new file mode 100644 index 000000000..5879a6c60 --- /dev/null +++ b/stripe/v2/core/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event_service import EventService as EventService diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py new file mode 100644 index 000000000..999fe8471 --- /dev/null +++ b/stripe/v2/core/_event_service.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.v2._event import Event +from stripe.v2._list_object import ListObject +from typing import cast +from typing_extensions import NotRequired, TypedDict + + +class EventService(StripeService): + class ListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ + object_id: str + """ + Primary object ID used to retrieve related events. + """ + page: NotRequired[str] + """ + The requested page number. + """ + + class RetrieveParams(TypedDict): + pass + + def list( + self, params: "EventService.ListParams", options: RequestOptions = {} + ) -> ListObject[Event]: + """ + List events, going back up to 30 days. + """ + return cast( + ListObject[Event], + self._request( + "get", + "/v2/core/events", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, params: "EventService.ListParams", options: RequestOptions = {} + ) -> ListObject[Event]: + """ + List events, going back up to 30 days. + """ + return cast( + ListObject[Event], + await self._request_async( + "get", + "/v2/core/events", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "EventService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Retrieves the details of an event. + """ + return cast( + Event, + self._request( + "get", + "/v2/core/events/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "EventService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Retrieves the details of an event. + """ + return cast( + Event, + await self._request_async( + "get", + "/v2/core/events/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/tests/api_resources/abstract/test_api_resource.py b/tests/api_resources/abstract/test_api_resource.py index ebb533c9f..005309f20 100644 --- a/tests/api_resources/abstract/test_api_resource.py +++ b/tests/api_resources/abstract/test_api_resource.py @@ -95,7 +95,7 @@ def test_convert_to_stripe_object(self): } converted = stripe.util.convert_to_stripe_object( - sample, "akey", None, None + sample, "akey", None, None, api_mode="V1" ) # Types diff --git a/tests/api_resources/test_list_object.py b/tests/api_resources/test_list_object.py index 98a4e72ce..fe6340a14 100644 --- a/tests/api_resources/test_list_object.py +++ b/tests/api_resources/test_list_object.py @@ -95,13 +95,15 @@ def test_empty_list(self): def test_iter(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object(arr) + expected = stripe.util.convert_to_stripe_object(arr, api_mode="V1") lo = stripe.ListObject.construct_from({"data": arr}, None) assert list(lo) == expected def test_iter_reversed(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object(list(reversed(arr))) + expected = stripe.util.convert_to_stripe_object( + list(reversed(arr)), api_mode="V1" + ) lo = stripe.ListObject.construct_from({"data": arr}, None) assert list(reversed(lo)) == expected diff --git a/tests/api_resources/test_list_object_v2.py b/tests/api_resources/test_list_object_v2.py new file mode 100644 index 000000000..d86ed54c5 --- /dev/null +++ b/tests/api_resources/test_list_object_v2.py @@ -0,0 +1,147 @@ +from __future__ import absolute_import, division, print_function + +import json + +import pytest + +import stripe +from stripe.v2._list_object import ListObject +from tests.http_client_mock import HTTPClientMock + + +class TestListObjectV2(object): + @pytest.fixture + def list_object(self): + return ListObject.construct_from( + { + "data": ["a", "b", "c"], + "next_page_url": None, + "previous_page_url": None, + }, + "mykey", + ) + + def test_iter(self): + arr = ["a", "b", "c"] + expected = stripe.util.convert_to_stripe_object(arr, api_mode="V2") + lo = ListObject.construct_from({"data": arr}, None) + assert list(lo) == expected + + @staticmethod + def pageable_model_response(ids, next_page_url): + return { + "data": [{"id": id, "object": "pageablemodel"} for id in ids], + "next_page_url": next_page_url, + } + + def test_iter_one_page(self, http_client_mock): + lo = ListObject.construct_from( + self.pageable_model_response(["pm_123", "pm_124"], None), "mykey" + ) + + http_client_mock.assert_no_request() + + seen = [item["id"] for item in lo.auto_paging_iter()] + + assert seen == ["pm_123", "pm_124"] + + def test_iter_two_pages(self, http_client_mock): + method = "get" + path = "/v2/pageablemodels" + + lo = ListObject.construct_from( + self.pageable_model_response( + ["pm_123", "pm_124"], "/v2/pageablemodels?foo=bar&page=page_2" + ), + None, + ) + + http_client_mock.stub_request( + method, + path=path, + query_string="foo=bar&page=page_3", + rbody=json.dumps( + self.pageable_model_response(["pm_127", "pm_128"], None) + ), + ) + + http_client_mock.stub_request( + method, + path=path, + query_string="foo=bar&page=page_2", + rbody=json.dumps( + self.pageable_model_response( + ["pm_125", "pm_126"], + "/v2/pageablemodels?foo=bar&page=page_3", + ) + ), + ) + + seen = [item["id"] for item in lo.auto_paging_iter()] + + http_client_mock.assert_requested( + method, path=path, query_string="foo=bar&page=page_2" + ) + + http_client_mock.assert_requested( + method, path=path, query_string="foo=bar&page=page_3" + ) + + assert seen == [ + "pm_123", + "pm_124", + "pm_125", + "pm_126", + "pm_127", + "pm_128", + ] + + def test_iter_forwards_api_key(self, http_client_mock: HTTPClientMock): + client = stripe.StripeClient( + http_client=http_client_mock.get_mock_http_client(), + api_key="sk_test_xyz", + ) + + method = "get" + query_string_1 = "object_id=obj_123" + query_string_2 = "object_id=obj_123&page=page_2" + path = "/v2/core/events" + + http_client_mock.stub_request( + method, + path=path, + query_string=query_string_1, + rbody='{"data": [{"id": "x"}], "next_page_url": "/v2/core/events?object_id=obj_123&page=page_2"}', + rcode=200, + rheaders={}, + ) + + http_client_mock.stub_request( + method, + path=path, + query_string=query_string_2, + rbody='{"data": [{"id": "y"}, {"id": "z"}], "next_page_url": null}', + rcode=200, + rheaders={}, + ) + + lo = client.v2.core.events.list( + params={"object_id": "obj_123"}, + options={"api_key": "sk_test_iter_forwards_options"}, + ) + + seen = [item["id"] for item in lo.auto_paging_iter()] + + assert seen == ["x", "y", "z"] + http_client_mock.assert_requested( + method, + path=path, + query_string=query_string_1, + api_key="sk_test_iter_forwards_options", + ) + http_client_mock.assert_requested( + method, + path=path, + query_string=query_string_2, + api_key="sk_test_iter_forwards_options", + ) diff --git a/tests/api_resources/test_search_result_object.py b/tests/api_resources/test_search_result_object.py index 6e4d3f535..83266f0b9 100644 --- a/tests/api_resources/test_search_result_object.py +++ b/tests/api_resources/test_search_result_object.py @@ -82,7 +82,7 @@ def test_empty_search_result(self): def test_iter(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object(arr) + expected = stripe.util.convert_to_stripe_object(arr, api_mode="V1") sro = stripe.SearchResultObject.construct_from({"data": arr}, None) assert list(sro) == expected diff --git a/tests/fixtures/card.json b/tests/fixtures/card.json deleted file mode 100644 index 97a40a318..000000000 --- a/tests/fixtures/card.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "id": "card_123", - "object": "payment_methods.card", - "address_city": null, - "address_country": null, - "address_line1": null, - "address_line1_check": null, - "address_line2": null, - "address_state": null, - "address_zip": null, - "address_zip_check": null, - "brand": "Visa", - "country": "US", - "customer": "cus_123", - "cvc_check": null, - "dynamic_last4": null, - "exp_month": 8, - "exp_year": 2019, - "fingerprint": "Xt5EWLLDS7FJjR1c", - "funding": "credit", - "last4": "4242", - "metadata": { - }, - "name": null, - "tokenization_method": null -} diff --git a/tests/http_client_mock.py b/tests/http_client_mock.py index 0e2ea588a..db13f432c 100644 --- a/tests/http_client_mock.py +++ b/tests/http_client_mock.py @@ -336,6 +336,7 @@ def assert_requested( api_key=None, stripe_version=None, stripe_account=None, + stripe_context=None, content_type=None, idempotency_key=None, user_agent=None, @@ -366,6 +367,7 @@ def assert_requested( api_key=api_key, stripe_version=stripe_version, stripe_account=stripe_account, + stripe_context=stripe_context, content_type=content_type, idempotency_key=idempotency_key, user_agent=user_agent, diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index 8acb0e87d..82f10e5a3 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -3,25 +3,25 @@ import tempfile import uuid from collections import OrderedDict +from urllib.parse import urlencode, urlsplit import pytest +import urllib3 import stripe from stripe import util +from stripe._api_requestor import _api_encode, _APIRequestor +from stripe._request_options import RequestOptions +from stripe._requestor_options import ( + RequestorOptions, + _GlobalRequestorOptions, +) +from stripe._stripe_object import StripeObject from stripe._stripe_response import ( StripeStreamResponse, StripeStreamResponseAsync, ) -from stripe._api_requestor import _APIRequestor, _api_encode -from stripe._stripe_object import StripeObject -from stripe._requestor_options import ( - _GlobalRequestorOptions, -) -from stripe._request_options import RequestOptions - -from urllib.parse import urlencode, urlsplit - -import urllib3 +from tests.http_client_mock import HTTPClientMock VALID_API_METHODS = ("get", "post", "delete") @@ -49,6 +49,19 @@ def __repr__(self): return "AnyUUID4Matcher()" +class IsNoneMatcher: + """ + Matcher to make assertions against None because `assert_requested` doesn't + run checks if you pass `None` as the expected value. + """ + + def __eq__(self, other): + return other is None + + def __repr__(self): + return "None (from IsNoneMatcher())" + + class TestAPIRequestor(object): ENCODE_INPUTS = { "dict": { @@ -113,8 +126,12 @@ def requestor(self, http_client_mock): return requestor @property - def valid_path(self): - return "/foo" + def v1_path(self): + return "/v1/foo" + + @property + def v2_path(self): + return "/v2/foo" def encoder_check(self, key): stk_key = "my%s" % (key,) @@ -162,9 +179,46 @@ def test_param_encoding(self, requestor, http_client_mock): http_client_mock.assert_requested("get", query_string=query_string) + def test_param_api_mode_preview(self, requestor, http_client_mock): + http_client_mock.stub_request( + "post", path=self.v2_path, rbody="{}", rcode=200 + ) + + requestor.request( + "post", self.v2_path, self.ENCODE_INPUTS, base_address="api" + ) + + expectation = '{"dict": {"astring": "bar", "anint": 5, "anull": null, "adatetime": 1356994800, "atuple": [1, 2], "adict": {"foo": "bar", "boz": 5}, "alist": ["foo", "bar"]}, "list": [1, "foo", "baz"], "string": "boo", "unicode": "\\u1234", "datetime": 1356994801, "none": null}' + + http_client_mock.assert_requested( + "post", + content_type="application/json", + post_data=expectation, + is_json=True, + ) + + def test_encodes_null_values_preview(self, requestor, http_client_mock): + http_client_mock.stub_request( + "post", path=self.v2_path, rbody="{}", rcode=200 + ) + + requestor.request( + "post", + self.v2_path, + {"foo": None}, + base_address="api", + ) + + http_client_mock.assert_requested( + "post", + content_type="application/json", + post_data='{"foo": null}', + is_json=True, + ) + def test_dictionary_list_encoding(self): params = {"foo": {"0": {"bar": "bat"}}} - encoded = list(_api_encode(params)) + encoded = list(_api_encode(params, "V1")) key, value = encoded[0] assert key == "foo[0][bar]" @@ -181,7 +235,7 @@ def test_ordereddict_encoding(self): ] ) } - encoded = list(_api_encode(params)) + encoded = list(_api_encode(params, "V1")) assert encoded[0][0] == "ordered[one]" assert encoded[1][0] == "ordered[two]" @@ -224,11 +278,11 @@ def test_url_construction(self, requestor, http_client_mock): def test_empty_methods(self, requestor, http_client_mock): for meth in VALID_API_METHODS: http_client_mock.stub_request( - meth, path=self.valid_path, rbody="{}", rcode=200 + meth, path=self.v1_path, rbody="{}", rcode=200 ) resp = requestor.request( - meth, self.valid_path, {}, base_address="api" + meth, self.v1_path, {}, base_address="api" ) if meth == "post": @@ -246,13 +300,13 @@ async def test_empty_methods_async(self, requestor, http_client_mock): for meth in VALID_API_METHODS: http_client_mock.stub_request( meth, - path=self.valid_path, + path=self.v1_path, rbody="{}", rcode=200, ) resp = await requestor.request_async( - meth, self.valid_path, {}, base_address="api" + meth, self.v1_path, {}, base_address="api" ) if meth == "post": @@ -277,14 +331,14 @@ async def async_iter(): for meth in VALID_API_METHODS: http_client_mock.stub_request( meth, - path=self.valid_path, + path=self.v1_path, rbody=async_iter(), rcode=200, ) resp = await requestor.request_stream_async( meth, - self.valid_path, + self.v1_path, {}, base_address="api", ) @@ -305,14 +359,14 @@ def test_empty_methods_streaming_response( for meth in VALID_API_METHODS: http_client_mock.stub_request( meth, - path=self.valid_path, + path=self.v1_path, rbody=util.io.BytesIO(b"thisisdata"), rcode=200, ) resp = requestor.request_stream( meth, - self.valid_path, + self.v1_path, {}, base_address="api", ) @@ -338,7 +392,7 @@ def test_methods_with_params_and_response( http_client_mock.stub_request( method, - path=self.valid_path, + path=self.v1_path, query_string=encoded if method != "post" else "", rbody='{"foo": "bar", "baz": 6}', rcode=200, @@ -352,7 +406,7 @@ def test_methods_with_params_and_response( resp = requestor.request( method, - self.valid_path, + self.v1_path, params, base_address="api", ) @@ -368,7 +422,7 @@ def test_methods_with_params_and_response( else: abs_url = "%s%s?%s" % ( stripe.api_base, - self.valid_path, + self.v1_path, encoded, ) http_client_mock.assert_requested(method, abs_url=abs_url) @@ -384,7 +438,7 @@ def test_methods_with_params_and_streaming_response( http_client_mock.stub_request( method, - path=self.valid_path, + path=self.v1_path, query_string=encoded if method != "post" else "", rbody=util.io.BytesIO(b'{"foo": "bar", "baz": 6}'), rcode=200, @@ -398,7 +452,7 @@ def test_methods_with_params_and_streaming_response( resp = requestor.request_stream( method, - self.valid_path, + self.v1_path, params, base_address="api", ) @@ -411,19 +465,19 @@ def test_methods_with_params_and_streaming_response( else: abs_url = "%s%s?%s" % ( stripe.api_base, - self.valid_path, + self.v1_path, encoded, ) http_client_mock.assert_requested(method, abs_url=abs_url) def test_uses_headers(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) request_options: RequestOptions = {"headers": {"foo": "bar"}} requestor.request( "get", - self.valid_path, + self.v1_path, {}, options=request_options, base_address="api", @@ -432,12 +486,12 @@ def test_uses_headers(self, requestor, http_client_mock): def test_uses_api_version(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) request_options: RequestOptions = {"stripe_version": "fooversion"} requestor.request( "get", - self.valid_path, + self.v1_path, options=request_options, base_address="api", ) @@ -448,7 +502,7 @@ def test_uses_api_version(self, requestor, http_client_mock): def test_prefers_headers_api_version(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) request_options: RequestOptions = { "stripe_version": "fooversion", @@ -456,7 +510,7 @@ def test_prefers_headers_api_version(self, requestor, http_client_mock): } requestor.request( "get", - self.valid_path, + self.v1_path, {}, options=request_options, base_address="api", @@ -471,10 +525,10 @@ def test_uses_instance_key(self, requestor, http_client_mock): requestor = requestor._replace_options(RequestOptions(api_key=key)) http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") http_client_mock.assert_requested("get", api_key=key) assert requestor.api_key == key @@ -486,16 +540,66 @@ def test_uses_instance_account(self, requestor, http_client_mock): ) http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") http_client_mock.assert_requested( "get", stripe_account=account, ) + def test_removes_None_account( + self, requestor, http_client_mock: HTTPClientMock + ): + """ + important test! + + If there's no context on a retrieved event, it's important that passing `stripe-account: None` + in the generated fetch_related_object doesn't actually send the null header + """ + account = None + requestor = requestor._replace_options( + RequestOptions(stripe_account=account) + ) + + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + + requestor.request("get", self.v1_path, {}, base_address="api") + + assert len(http_client_mock.get_all_calls()) == 1 + call = http_client_mock.get_last_call() + assert call.headers is not None + + assert "Stripe-Account" not in call.headers + + def test_uses_instance_context(self, http_client_mock): + context = "acct_bar" + + requestor = _APIRequestor( + options=RequestorOptions( + **{ + **_GlobalRequestorOptions().to_dict(), + "stripe_context": context, + } + ), + client=http_client_mock.get_mock_http_client(), + ) + + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + + requestor.request("get", self.v1_path, {}, base_address="api") + + http_client_mock.assert_requested( + "get", + stripe_context=context, + ) + def test_sets_default_http_client(self, mocker): assert not stripe.default_http_client @@ -528,9 +632,9 @@ def test_uses_app_info(self, requestor, http_client_mock): ) http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") ua = "Stripe/v1 PythonBindings/%s" % (stripe.VERSION,) ua += " MyAwesomePlugin/1.2.34 (https://myawesomeplugin.info)" @@ -557,7 +661,7 @@ def test_handles_failed_platform_call( self, requestor, mocker, http_client_mock ): http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{}", rcode=200 + "get", path=self.v1_path, rbody="{}", rcode=200 ) def fail(): @@ -565,7 +669,7 @@ def fail(): mocker.patch("platform.platform", side_effect=fail) - requestor.request("get", self.valid_path, {}, {}, base_address="api") + requestor.request("get", self.v1_path, {}, {}, base_address="api") last_call = http_client_mock.get_last_call() last_call.assert_method("get") @@ -577,104 +681,130 @@ def fail(): ) def test_uses_given_idempotency_key(self, requestor, http_client_mock): - meth = "post" + method = "post" http_client_mock.stub_request( - meth, path=self.valid_path, rbody="{}", rcode=200 + method, path=self.v1_path, rbody="{}", rcode=200 ) request_options: RequestOptions = {"idempotency_key": "123abc"} requestor.request( - meth, - self.valid_path, + method, + self.v1_path, {}, options=request_options, base_address="api", ) http_client_mock.assert_requested( - meth, idempotency_key="123abc", post_data="" + method, idempotency_key="123abc", post_data="" ) def test_uuid4_idempotency_key_when_not_given( self, requestor, http_client_mock ): - meth = "post" + method = "post" + http_client_mock.stub_request( + method, path=self.v1_path, rbody="{}", rcode=200 + ) + requestor.request(method, self.v1_path, {}, base_address="api") + + http_client_mock.assert_requested( + method, idempotency_key=AnyUUID4Matcher(), post_data="" + ) + + def test_generates_default_idempotency_key_for_v2_delete( + self, requestor, http_client_mock + ): + method = "delete" + http_client_mock.stub_request( + method, path=self.v2_path, rbody="{}", rcode=200 + ) + requestor.request(method, self.v2_path, {}, base_address="api") + + http_client_mock.assert_requested( + method, idempotency_key=AnyUUID4Matcher() + ) + + def test_skips_generates_default_idempotency_key_for_v1_delete( + self, requestor, http_client_mock + ): + method = "delete" http_client_mock.stub_request( - meth, path=self.valid_path, rbody="{}", rcode=200 + method, path=self.v1_path, rbody="{}", rcode=200 ) - requestor.request(meth, self.valid_path, {}, base_address="api") + requestor.request(method, self.v1_path, {}, base_address="api") http_client_mock.assert_requested( - meth, idempotency_key=AnyUUID4Matcher(), post_data="" + method, idempotency_key=IsNoneMatcher() ) def test_fails_without_api_key(self, requestor): stripe.api_key = None with pytest.raises(stripe.error.AuthenticationError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_request_error_404(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=404 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=404 ) with pytest.raises(stripe.error.InvalidRequestError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_request_error_400(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=400 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=400 ) with pytest.raises(stripe.error.InvalidRequestError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_idempotency_error(self, requestor, http_client_mock): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": {"type": "idempotency_error"}}', rcode=400, ) with pytest.raises(stripe.error.IdempotencyError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_authentication_error(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=401 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=401 ) with pytest.raises(stripe.error.AuthenticationError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_permissions_error(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=403 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=403 ) with pytest.raises(stripe.error.PermissionError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_card_error(self, requestor, http_client_mock): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": {"code": "invalid_expiry_year"}}', rcode=402, ) with pytest.raises(stripe.error.CardError) as excinfo: - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") assert excinfo.value.code == "invalid_expiry_year" def test_rate_limit_error(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=429 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=429 ) with pytest.raises(stripe.error.RateLimitError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_old_rate_limit_error(self, requestor, http_client_mock): """ @@ -682,29 +812,29 @@ def test_old_rate_limit_error(self, requestor, http_client_mock): """ http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": {"code":"rate_limit"}}', rcode=400, ) with pytest.raises(stripe.error.RateLimitError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_server_error(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody='{"error": {}}', rcode=500 + "get", path=self.v1_path, rbody='{"error": {}}', rcode=500 ) with pytest.raises(stripe.error.APIError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_json(self, requestor, http_client_mock): http_client_mock.stub_request( - "get", path=self.valid_path, rbody="{", rcode=200 + "get", path=self.v1_path, rbody="{", rcode=200 ) with pytest.raises(stripe.error.APIError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_method(self, requestor): with pytest.raises(stripe.error.APIConnectionError): @@ -713,49 +843,49 @@ def test_invalid_method(self, requestor): def test_oauth_invalid_requestor_error(self, requestor, http_client_mock): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": "invalid_request"}', rcode=400, ) with pytest.raises(stripe.oauth_error.InvalidRequestError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_client_error(self, requestor, http_client_mock): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": "invalid_client"}', rcode=401, ) with pytest.raises(stripe.oauth_error.InvalidClientError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_grant_error(self, requestor, http_client_mock): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody='{"error": "invalid_grant"}', rcode=400, ) with pytest.raises(stripe.oauth_error.InvalidGrantError): - requestor.request("get", self.valid_path, {}, base_address="api") + requestor.request("get", self.v1_path, {}, base_address="api") def test_extract_error_from_stream_request_for_bytes( self, requestor, http_client_mock ): http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody=util.io.BytesIO(b'{"error": "invalid_grant"}'), rcode=400, ) with pytest.raises(stripe.oauth_error.InvalidGrantError): requestor.request_stream( - "get", self.valid_path, {}, base_address="api" + "get", self.v1_path, {}, base_address="api" ) def test_extract_error_from_stream_request_for_response( @@ -764,7 +894,7 @@ def test_extract_error_from_stream_request_for_response( # Responses don't have getvalue, they only have a read method. http_client_mock.stub_request( "get", - path=self.valid_path, + path=self.v1_path, rbody=urllib3.response.HTTPResponse( body=util.io.BytesIO(b'{"error": "invalid_grant"}'), preload_content=False, @@ -774,20 +904,20 @@ def test_extract_error_from_stream_request_for_response( with pytest.raises(stripe.oauth_error.InvalidGrantError): requestor.request_stream( - "get", self.valid_path, {}, base_address="api" + "get", self.v1_path, {}, base_address="api" ) def test_raw_request_with_file_param(self, requestor, http_client_mock): test_file = tempfile.NamedTemporaryFile() test_file.write("\u263a".encode("utf-16")) test_file.seek(0) - meth = "post" + method = "post" path = "/v1/files" params = {"file": test_file, "purpose": "dispute_evidence"} supplied_headers = {"Content-Type": "multipart/form-data"} - http_client_mock.stub_request(meth, path=path, rbody="{}", rcode=200) + http_client_mock.stub_request(method, path=path, rbody="{}", rcode=200) requestor.request( - meth, + method, path, params, supplied_headers, diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 64b304971..3676af8ab 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -4460,6 +4460,26 @@ async def test_checkout_sessions_post_2_service_async( post_data="success_url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fexample.com%2Fsuccess&line_items[0][price]=price_xxxxxxxxxxxxx&line_items[0][quantity]=2&mode=payment", ) + def test_core_events_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/events/ll_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.events.retrieve("ll_123") + http_client_mock.assert_requested( + "get", + path="/v2/core/events/ll_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_country_specs_get(self, http_client_mock: HTTPClientMock) -> None: stripe.CountrySpec.list(limit=3) http_client_mock.assert_requested( @@ -25845,92 +25865,6 @@ async def test_terminal_readers_process_payment_intent_post_service_async( post_data="payment_intent=pi_xxxxxxxxxxxxx", ) - def test_terminal_readers_process_setup_intent_post( - self, http_client_mock: HTTPClientMock - ) -> None: - stripe.terminal.Reader.process_setup_intent( - "tmr_xxxxxxxxxxxxx", - setup_intent="seti_xxxxxxxxxxxxx", - customer_consent_collected=True, - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - query_string="", - post_data="setup_intent=seti_xxxxxxxxxxxxx&customer_consent_collected=True", - ) - - def test_terminal_readers_process_setup_intent_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.terminal.readers.process_setup_intent( - "tmr_xxxxxxxxxxxxx", - { - "setup_intent": "seti_xxxxxxxxxxxxx", - "customer_consent_collected": True, - }, - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - query_string="", - api_base="https://api.stripe.com", - post_data="setup_intent=seti_xxxxxxxxxxxxx&customer_consent_collected=True", - ) - - @pytest.mark.anyio - async def test_terminal_readers_process_setup_intent_post_async( - self, http_client_mock: HTTPClientMock - ) -> None: - await stripe.terminal.Reader.process_setup_intent_async( - "tmr_xxxxxxxxxxxxx", - setup_intent="seti_xxxxxxxxxxxxx", - customer_consent_collected=True, - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - query_string="", - post_data="setup_intent=seti_xxxxxxxxxxxxx&customer_consent_collected=True", - ) - - @pytest.mark.anyio - async def test_terminal_readers_process_setup_intent_post_service_async( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - await client.terminal.readers.process_setup_intent_async( - "tmr_xxxxxxxxxxxxx", - { - "setup_intent": "seti_xxxxxxxxxxxxx", - "customer_consent_collected": True, - }, - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", - query_string="", - api_base="https://api.stripe.com", - post_data="setup_intent=seti_xxxxxxxxxxxxx&customer_consent_collected=True", - ) - def test_test_helpers_customers_fund_cash_balance_post( self, http_client_mock: HTTPClientMock ) -> None: diff --git a/tests/test_http_client.py b/tests/test_http_client.py index d6cbbbdf5..b671b1e7a 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, List from typing_extensions import Type from unittest.mock import call import pytest @@ -96,11 +96,13 @@ def test_new_http_client_async_fallback_no_import_found( class TestRetrySleepTimeDefaultHttpClient(StripeClientTestCase): from contextlib import contextmanager - def assert_sleep_times(self, client, expected): - until = len(expected) - actual = list( - map(lambda i: client._sleep_time_seconds(i + 1), range(until)) - ) + def assert_sleep_times( + self, client: _http_client.HTTPClient, expected: List[float] + ): + # the sleep duration for a request after N retries + actual = [ + client._sleep_time_seconds(i + 1) for i in range(len(expected)) + ] assert expected == actual @contextmanager @@ -128,7 +130,7 @@ def test_maximum_delay(self): client = _http_client.new_default_http_client() client._add_jitter_time = lambda sleep_seconds: sleep_seconds max_delay = _http_client.HTTPClient.MAX_DELAY - expected = [0.5, 1.0, max_delay, max_delay, max_delay] + expected = [0.5, 1.0, 2.0, 4.0, max_delay, max_delay, max_delay] self.assert_sleep_times(client, expected) def test_retry_after_header(self): @@ -1090,7 +1092,7 @@ class TestAPIEncode(StripeClientTestCase): def test_encode_dict(self): body = {"foo": {"dob": {"month": 1}, "name": "bat"}} - values = [t for t in _api_encode(body)] + values = [t for t in _api_encode(body, "V1")] assert ("foo[dob][month]", 1) in values assert ("foo[name]", "bat") in values @@ -1098,11 +1100,19 @@ def test_encode_dict(self): def test_encode_array(self): body = {"foo": [{"dob": {"month": 1}, "name": "bat"}]} - values = [t for t in _api_encode(body)] + values = [t for t in _api_encode(body, "V1")] assert ("foo[0][dob][month]", 1) in values assert ("foo[0][name]", "bat") in values + def test_encode_v2_array(self): + body = {"foo": [{"dob": {"month": 1}, "name": "bat"}]} + + values = [t for t in _api_encode(body, "V2")] + + assert ("foo[dob][month]", 1) in values + assert ("foo[name]", "bat") in values + class TestHTTPXClient(StripeClientTestCase, ClientTestBase): REQUEST_CLIENT: Type[_http_client.HTTPXClient] = _http_client.HTTPXClient diff --git a/tests/test_integration.py b/tests/test_integration.py index a96f9b533..843937541 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -13,6 +13,8 @@ from collections import defaultdict from typing import List, Dict, Tuple, Optional +from stripe._stripe_client import StripeClient + if platform.python_implementation() == "PyPy": pytest.skip("skip integration tests with PyPy", allow_module_level=True) @@ -101,7 +103,6 @@ def setup_stripe(self): stripe._default_proxy = None stripe.enable_telemetry = False stripe.max_network_retries = 3 - stripe.proxy = None yield stripe.api_base = orig_attrs["api_base"] stripe.upload_api_base = orig_attrs["api_base"] @@ -348,7 +349,9 @@ async def async_http_client(self, request, anyio_backend): async def set_global_async_http_client(self, async_http_client): stripe.default_http_client = async_http_client - async def test_async_success(self, set_global_async_http_client): + async def test_async_raw_request_success( + self, set_global_async_http_client + ): class MockServerRequestHandler(MyTestHandler): default_body = '{"id": "cus_123", "object": "customer"}'.encode( "utf-8" @@ -357,11 +360,16 @@ class MockServerRequestHandler(MyTestHandler): self.setup_mock_server(MockServerRequestHandler) - stripe.api_base = "http://localhost:%s" % self.mock_server_port - - cus = await stripe.Customer.create_async( - description="My test customer" + client = StripeClient( + "sk_test_123", + base_addresses={ + "api": "http://localhost:%s" % self.mock_server_port + }, + ) + resp = await client.raw_request_async( + "post", "/v1/customers", description="My test customer" ) + cus = client.deserialize(resp.data, api_mode="V1") reqs = MockServerRequestHandler.get_requests(1) req = reqs[0] @@ -370,14 +378,15 @@ class MockServerRequestHandler(MyTestHandler): assert req.command == "POST" assert isinstance(cus, stripe.Customer) - async def test_async_timeout(self, set_global_async_http_client): + async def test_async_raw_request_timeout( + self, set_global_async_http_client + ): class MockServerRequestHandler(MyTestHandler): def do_request(self, n): time.sleep(0.02) return super().do_request(n) self.setup_mock_server(MockServerRequestHandler) - stripe.api_base = "http://localhost:%s" % self.mock_server_port # If we set HTTPX's generic timeout the test is flaky (sometimes it's a ReadTimeout, sometimes its a ConnectTimeout) # so we set only the read timeout specifically. hc = stripe.default_http_client @@ -391,11 +400,20 @@ def do_request(self, n): expected_message = "A ServerTimeoutError was raised" else: raise ValueError(f"Unknown http client: {hc.name}") - stripe.max_network_retries = 0 exception = None try: - await stripe.Customer.create_async(description="My test customer") + client = StripeClient( + "sk_test_123", + http_client=hc, + base_addresses={ + "api": "http://localhost:%s" % self.mock_server_port + }, + max_network_retries=0, + ) + await client.raw_request_async( + "post", "/v1/customers", description="My test customer" + ) except stripe.APIConnectionError as e: exception = e @@ -403,7 +421,9 @@ def do_request(self, n): assert expected_message in str(exception.user_message) - async def test_async_retries(self, set_global_async_http_client): + async def test_async_raw_request_retries( + self, set_global_async_http_client + ): class MockServerRequestHandler(MyTestHandler): def do_request(self, n): if n == 0: @@ -417,16 +437,26 @@ def do_request(self, n): pass self.setup_mock_server(MockServerRequestHandler) - stripe.api_base = "http://localhost:%s" % self.mock_server_port - await stripe.Customer.create_async(description="My test customer") + client = StripeClient( + "sk_test_123", + base_addresses={ + "api": "http://localhost:%s" % self.mock_server_port + }, + max_network_retries=stripe.max_network_retries, + ) + await client.raw_request_async( + "post", "/v1/customers", description="My test customer" + ) reqs = MockServerRequestHandler.get_requests(2) req = reqs[0] assert req.path == "/v1/customers" - async def test_async_unretryable(self, set_global_async_http_client): + async def test_async_raw_request_unretryable( + self, set_global_async_http_client + ): class MockServerRequestHandler(MyTestHandler): def do_request(self, n): return ( @@ -438,11 +468,18 @@ def do_request(self, n): pass self.setup_mock_server(MockServerRequestHandler) - stripe.api_base = "http://localhost:%s" % self.mock_server_port exception = None try: - await stripe.Customer.create_async(description="My test customer") + client = StripeClient( + "sk_test_123", + base_addresses={ + "api": "http://localhost:%s" % self.mock_server_port + }, + ) + await client.raw_request_async( + "post", "/v1/customers", description="My test customer" + ) except stripe.AuthenticationError as e: exception = e diff --git a/tests/test_raw_request.py b/tests/test_raw_request.py new file mode 100644 index 000000000..459b0d98b --- /dev/null +++ b/tests/test_raw_request.py @@ -0,0 +1,225 @@ +from __future__ import absolute_import, division, print_function + +import datetime + +import stripe + +from tests.test_api_requestor import GMT1 + + +class TestRawRequest(object): + ENCODE_INPUTS = { + "type": "standard", + "int": 123, + "datetime": datetime.datetime(2013, 1, 1, second=1, tzinfo=GMT1()), + } + POST_REL_URL = "/v1/accounts" + GET_REL_URL = "/v1/accounts/acct_123" + POST_REL_URL_V2 = "/v2/billing/meter_event_session" + GET_REL_URL_V2 = "/v2/accounts/acct_123" + + def test_form_request_get( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "get", + path=self.GET_REL_URL, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + + resp = stripe_mock_stripe_client.raw_request("get", self.GET_REL_URL) + http_client_mock.assert_requested("get", path=self.GET_REL_URL) + + deserialized = stripe_mock_stripe_client.deserialize( + resp, api_mode="V1" + ) + assert isinstance(deserialized, stripe.Account) + + def test_form_request_post( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "post", + path=self.POST_REL_URL, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + + expectation = "type=standard&int=123&datetime=1356994801" + + resp = stripe_mock_stripe_client.raw_request( + "post", self.POST_REL_URL, **self.ENCODE_INPUTS + ) + + http_client_mock.assert_requested( + "post", + path=self.POST_REL_URL, + content_type="application/x-www-form-urlencoded", + post_data=expectation, + ) + + deserialized = stripe_mock_stripe_client.deserialize( + resp, api_mode="V1" + ) + assert isinstance(deserialized, stripe.Account) + + def test_preview_request_post( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "post", + path=self.POST_REL_URL_V2, + rbody='{"id": "bmes_123", "object": "billing.meter_event_session"}', + rcode=200, + rheaders={}, + ) + + params = dict({}, **self.ENCODE_INPUTS) + expectation = ( + '{"type": "standard", "int": 123, "datetime": 1356994801}' + ) + + resp = stripe_mock_stripe_client.raw_request( + "post", self.POST_REL_URL_V2, **params + ) + + http_client_mock.assert_requested( + "post", + path=self.POST_REL_URL_V2, + content_type="application/json", + post_data=expectation, + is_json=True, + ) + + deserialized = stripe_mock_stripe_client.deserialize( + resp, api_mode="V2" + ) + assert isinstance(deserialized, stripe.v2.billing.MeterEventSession) + + def test_form_request_with_extra_headers( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "get", + path=self.GET_REL_URL, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + + extra_headers = {"foo": "bar", "Stripe-Account": "acct_123"} + params = {"headers": extra_headers} + + stripe_mock_stripe_client.raw_request( + "get", self.GET_REL_URL, **params + ) + + http_client_mock.assert_requested( + "get", + path=self.GET_REL_URL, + extra_headers=extra_headers, + ) + + def test_preview_request_default_api_version( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "get", + path=self.GET_REL_URL_V2, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + params = {} + + stripe_mock_stripe_client.raw_request( + "get", self.GET_REL_URL_V2, **params + ) + + http_client_mock.assert_requested( + "get", + path=self.GET_REL_URL_V2, + ) + + def test_preview_request_overridden_api_version( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "post", + path=self.POST_REL_URL_V2, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + stripe_version_override = "2023-05-15.preview" + params = { + "stripe_version": stripe_version_override, + } + + stripe_mock_stripe_client.raw_request( + "post", self.POST_REL_URL_V2, **params + ) + + http_client_mock.assert_requested( + "post", + path=self.POST_REL_URL_V2, + content_type="application/json", + stripe_version=stripe_version_override, + post_data="{}", + is_json=True, + ) + + # TODO(jar) this test is not applicable yet, but may be some day + # @pytest.mark.anyio + # async def test_form_request_get_async( + # self, http_client_mock, stripe_mock_stripe_client + # ): + # http_client_mock.stub_request( + # "get", + # path=self.GET_REL_URL, + # rbody='{"id": "acct_123", "object": "account"}', + # rcode=200, + # rheaders={}, + # ) + # + # resp = await stripe_mock_stripe_client.raw_request_async( + # "get", self.GET_REL_URL + # ) + # + # http_client_mock.assert_requested("get", path=self.GET_REL_URL) + # + # deserialized = stripe_mock_stripe_client.deserialize(resp) + # assert isinstance(deserialized, stripe.Account) + # + def test_raw_request_usage_reported( + self, http_client_mock, stripe_mock_stripe_client + ): + http_client_mock.stub_request( + "post", + path=self.POST_REL_URL, + rbody='{"id": "acct_123", "object": "account"}', + rcode=200, + rheaders={}, + ) + + expectation = "type=standard&int=123&datetime=1356994801" + + resp = stripe_mock_stripe_client.raw_request( + "post", self.POST_REL_URL, **self.ENCODE_INPUTS + ) + + http_client_mock.assert_requested( + "post", + path=self.POST_REL_URL, + content_type="application/x-www-form-urlencoded", + post_data=expectation, + usage=["raw_request"], + ) + + deserialized = stripe_mock_stripe_client.deserialize( + resp, api_mode="V1" + ) + assert isinstance(deserialized, stripe.Account) diff --git a/tests/test_request_options.py b/tests/test_request_options.py index b57995ba1..27d1fe026 100644 --- a/tests/test_request_options.py +++ b/tests/test_request_options.py @@ -42,6 +42,7 @@ def test_extract_from_dict(self): "api_key": "sk_test_123", "stripe_version": "2020-01-01", "stripe_account": "acct_123", + "stripe_context": "wksp_123", "idempotency_key": "idemp_123", "headers": { "X-Stripe-Header": "Some-Value", @@ -52,6 +53,7 @@ def test_extract_from_dict(self): assert options.get("api_key") == "sk_test_123" assert options.get("stripe_version") == "2020-01-01" assert options.get("stripe_account") == "acct_123" + assert options.get("stripe_context") == "wksp_123" assert options.get("idempotency_key") == "idemp_123" assert options.get("headers") == {"X-Stripe-Header": "Some-Value"} assert remaining == {"foo": "bar"} diff --git a/tests/test_requestor_options.py b/tests/test_requestor_options.py index 2ed3731ad..b818d39a8 100644 --- a/tests/test_requestor_options.py +++ b/tests/test_requestor_options.py @@ -10,6 +10,7 @@ def test_to_dict(self): requestor = RequestorOptions( api_key="sk_test_123", stripe_account="acct_123", + stripe_context="wksp_123", stripe_version="2019-12-03", base_addresses={ "api": "https://api.example.com", @@ -21,6 +22,7 @@ def test_to_dict(self): assert requestor.to_dict() == { "api_key": "sk_test_123", "stripe_account": "acct_123", + "stripe_context": "wksp_123", "stripe_version": "2019-12-03", "base_addresses": { "api": "https://api.example.com", @@ -38,16 +40,22 @@ def test_global_options_get_updated( orig_api_base = stripe.api_base orig_connect_base = stripe.connect_api_base orig_upload_base = stripe.upload_api_base + orig_meter_events_base = stripe.meter_events_api_base orig_max_network_retries = stripe.max_network_retries assert global_options.api_key == orig_api_key assert global_options.base_addresses["api"] == orig_api_base assert global_options.base_addresses["connect"] == orig_connect_base assert global_options.base_addresses["files"] == orig_upload_base + assert ( + global_options.base_addresses["meter_events"] + == orig_meter_events_base + ) assert global_options.stripe_account is None stripe.api_key = "sk_test_555555555" stripe.api_base = "https://api.example.com" stripe.connect_api_base = "https://connect.example.com" stripe.upload_api_base = "https://upload.example.com" + stripe.meter_events_api_base = "https://meter-events.example.com" stripe.max_network_retries = 3 assert global_options.api_key == "sk_test_555555555" assert ( @@ -61,10 +69,15 @@ def test_global_options_get_updated( global_options.base_addresses["files"] == "https://upload.example.com" ) + assert ( + global_options.base_addresses["meter_events"] + == "https://meter-events.example.com" + ) assert global_options.stripe_account is None assert global_options.max_network_retries == 3 stripe.api_key = orig_api_key stripe.api_base = orig_api_base stripe.connect_api_base = orig_connect_base stripe.upload_api_base = orig_upload_base + stripe.meter_events_api_base = orig_meter_events_base stripe.max_network_retries = orig_max_network_retries diff --git a/tests/test_stripe_client.py b/tests/test_stripe_client.py index 6abfe396b..16a5d53bc 100644 --- a/tests/test_stripe_client.py +++ b/tests/test_stripe_client.py @@ -2,7 +2,11 @@ import stripe import pytest +from stripe.v2._event import Event from stripe._http_client import new_default_http_client +from stripe.events._v1_billing_meter_error_report_triggered_event import ( + V1BillingMeterErrorReportTriggeredEvent, +) class TestStripeClient(object): @@ -28,6 +32,32 @@ def test_v1_customers_retrieve( http_client_mock.assert_requested(method, path=path) assert customer.id is not None + def test_v2_events_retrieve(self, http_client_mock): + method = "get" + path = "/v2/core/events/evt_123" + http_client_mock.stub_request( + method, + path=path, + rbody='{"id": "evt_123","object": "v2.core.event", "type": "v1.billing.meter.error_report_triggered"}', + rcode=200, + rheaders={}, + ) + client = stripe.StripeClient( + api_key="keyinfo_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + event = client.v2.core.events.retrieve("evt_123") + + http_client_mock.assert_requested( + method, + api_base=stripe.DEFAULT_API_BASE, + path=path, + api_key="keyinfo_test_123", + ) + assert event.id is not None + assert isinstance(event, Event) + assert isinstance(event, V1BillingMeterErrorReportTriggeredEvent) + def test_no_api_key(self): with pytest.raises(stripe.error.AuthenticationError): stripe.StripeClient(None) # type: ignore @@ -61,12 +91,14 @@ def test_client_level_options(self, http_client_mock): api_base = "https://example.com" api_key = "sk_test_456" stripe_account = "acct_123" + stripe_context = "wksp_123" stripe_client = stripe.StripeClient( api_key=api_key, http_client=http_client_mock.get_mock_http_client(), base_addresses={"api": api_base}, stripe_account=stripe_account, + stripe_context=stripe_context, ) stripe_client.customers.retrieve("cus_xxxxxxxxxxxxx") @@ -77,6 +109,7 @@ def test_client_level_options(self, http_client_mock): path=path, api_key=api_key, stripe_account=stripe_account, + stripe_context=stripe_context, stripe_version=stripe.api_version, ) @@ -111,15 +144,18 @@ def test_request_level_options(self, http_client_mock): client_api_base = "https://example.com" client_api_key = "sk_test_456" client_stripe_account = "acct_123" + client_stripe_context = "wksp_123" request_api_key = "sk_test_789" request_stripe_account = "acct_456" + request_stripe_context = "wksp_456" stripe_client = stripe.StripeClient( api_key=client_api_key, http_client=http_client_mock.get_mock_http_client(), base_addresses={"api": client_api_base}, stripe_account=client_stripe_account, + stripe_context=client_stripe_context, ) stripe_client.customers.retrieve( @@ -127,6 +163,7 @@ def test_request_level_options(self, http_client_mock): options={ "api_key": request_api_key, "stripe_account": request_stripe_account, + "stripe_context": request_stripe_context, }, ) @@ -136,6 +173,7 @@ def test_request_level_options(self, http_client_mock): path=path, api_key=request_api_key, stripe_account=request_stripe_account, + stripe_context=request_stripe_context, stripe_version=stripe.api_version, ) @@ -179,6 +217,31 @@ def test_separate_clients_have_separate_options(self, http_client_mock): stripe_version=stripe.api_version, ) + def test_v2_encodes_none_as_null(self, http_client_mock): + http_client_mock.stub_request( + "post", + path="/v2/billing/meter_events", + rbody='{"event_name": "cool", "payload": {}, "identifier": null}', + rcode=200, + rheaders={}, + ) + + client = stripe.StripeClient( + api_key="sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.meter_events.create( + {"event_name": "cool", "payload": {}, "identifier": None} # type: ignore - None is not valid for `identifier` + ) + + http_client_mock.assert_requested( + "post", + content_type="application/json", + post_data='{"event_name": "cool", "payload": {}, "identifier": null}', + is_json=True, + ) + def test_carries_over_requestor_options_to_resource( self, http_client_mock ): @@ -230,7 +293,8 @@ def test_user_options_are_not_mutated(self, http_client_mock): http_client_mock.stub_request( "get", - path="/v1/accounts", + path="/v2/core/events", + query_string="object_id=obj_123", rbody='{"data": [{"id": "x"}], "next_page": "page_2"}', rcode=200, rheaders={}, @@ -238,7 +302,9 @@ def test_user_options_are_not_mutated(self, http_client_mock): my_options: stripe.RequestOptions = {"api_key": "sk_test_xyz"} - client.accounts.list(options=my_options) + client.v2.core.events.list( + {"object_id": "obj_123"}, options=my_options + ) assert my_options == {"api_key": "sk_test_xyz"} diff --git a/tests/test_util.py b/tests/test_util.py index df045a749..93b75c84f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -135,7 +135,7 @@ def test_convert_to_stripe_object_and_back(self): "livemode": False, } - obj = util.convert_to_stripe_object(resp) + obj = util.convert_to_stripe_object(resp, api_mode="V1") assert isinstance(obj, stripe.Balance) assert isinstance(obj.available, list) assert isinstance(obj.available[0], stripe.stripe_object.StripeObject) @@ -149,4 +149,6 @@ def test_convert_to_stripe_object_and_back(self): def test_sanitize_id(self): sanitized_id = util.sanitize_id("cu %x 123") + if isinstance(sanitized_id, bytes): + sanitized_id = sanitized_id.decode("utf-8", "strict") assert sanitized_id == "cu++%25x+123" diff --git a/tests/test_v2_error.py b/tests/test_v2_error.py new file mode 100644 index 000000000..f2828c377 --- /dev/null +++ b/tests/test_v2_error.py @@ -0,0 +1,141 @@ +from __future__ import absolute_import, division, print_function + +import json + +import pytest + +import stripe +from stripe import error +from tests.http_client_mock import HTTPClientMock + + +class TestV2Error(object): + @pytest.fixture(scope="function") + def stripe_client(self, http_client_mock): + return stripe.StripeClient( + api_key="keyinfo_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + def test_raises_v2_error( + self, + stripe_client: stripe.StripeClient, + http_client_mock: HTTPClientMock, + ): + method = "get" + path = "/v2/core/events/evt_123" + + error_response = { + "error": { + "type": "temporary_session_expired", + "code": "session_bad", + "message": "you messed up", + } + } + http_client_mock.stub_request( + method, + path=path, + rbody=json.dumps(error_response), + rcode=400, + rheaders={}, + ) + + try: + stripe_client.v2.core.events.retrieve("evt_123") + except error.TemporarySessionExpiredError as e: + assert e.code == "session_bad" + assert e.error.code == "session_bad" + assert e.error.message == "you messed up" + else: + assert False, "Should have raised a TemporarySessionExpiredError" + + http_client_mock.assert_requested( + method, + path=path, + api_key="keyinfo_test_123", + ) + + @pytest.mark.skip("python doesn't have any errors with invalid params yet") + def test_raises_v2_error_with_field( + self, + stripe_client: stripe.StripeClient, + http_client_mock: HTTPClientMock, + ): + method = "post" + path = "/v2/payment_methods/us_bank_accounts" + + error_response = { + "error": { + "type": "invalid_payment_method", + "code": "invalid_us_bank_account", + "message": "bank account is invalid", + "invalid_param": "routing_number", + } + } + http_client_mock.stub_request( + method, + path=path, + rbody=json.dumps(error_response), + rcode=400, + rheaders={}, + ) + + try: + stripe_client.v2.payment_methods.us_bank_accounts.create( + params={"account_number": "123", "routing_number": "456"} + ) + except error.InvalidPaymentMethodError as e: + assert e.invalid_param == "routing_number" + assert e.error.code == "invalid_us_bank_account" + assert e.error.message == "bank account is invalid" + else: + assert False, "Should have raised a InvalidUsBankAccountError" + + http_client_mock.assert_requested( + method, + path=path, + api_key="keyinfo_test_123", + ) + + def test_falls_back_to_v1_error( + self, + stripe_client: stripe.StripeClient, + http_client_mock: HTTPClientMock, + ): + method = "post" + path = "/v2/billing/meter_events" + + error_response = { + "error": { + "code": "invalid_request", + "message": "your request is invalid", + "param": "invalid_param", + } + } + http_client_mock.stub_request( + method, + path=path, + rbody=json.dumps(error_response), + rcode=400, + rheaders={"request-id": "123"}, + ) + + try: + stripe_client.v2.billing.meter_events.create( + {"event_name": "asdf", "payload": {}} + ) + except error.InvalidRequestError as e: + assert e.param == "invalid_param" + assert repr(e) == ( + "InvalidRequestError(message='your request is invalid', " + "param='invalid_param', code='invalid_request', " + "http_status=400, request_id='123')" + ) + else: + assert False, "Should have raised a InvalidRequestError" + + http_client_mock.assert_requested( + method, + path=path, + api_key="keyinfo_test_123", + ) diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py new file mode 100644 index 000000000..4fbbc7af7 --- /dev/null +++ b/tests/test_v2_event.py @@ -0,0 +1,110 @@ +import json +from typing import Callable + +import pytest + +import stripe +from stripe import ThinEvent +from tests.test_webhook import DUMMY_WEBHOOK_SECRET, generate_header + +EventParser = Callable[[str], ThinEvent] + + +class TestV2Event(object): + @pytest.fixture(scope="function") + def v2_payload_no_data(self): + return json.dumps( + { + "id": "evt_234", + "object": "v2.core.event", + "type": "financial_account.balance.opened", + "created": "2022-02-15T00:27:45.330Z", + "related_object": { + "id": "fa_123", + "type": "financial_account", + "url": "/https/github.com/v2/financial_accounts/fa_123", + "stripe_context": "acct_123", + }, + "reason": { + "id": "foo", + "idempotency_key": "bar", + }, + } + ) + + @pytest.fixture(scope="function") + def v2_payload_with_data(self): + return json.dumps( + { + "id": "evt_234", + "object": "v2.core.event", + "type": "financial_account.balance.opened", + "created": "2022-02-15T00:27:45.330Z", + "related_object": { + "id": "fa_123", + "type": "financial_account", + "url": "/https/github.com/v2/financial_accounts/fa_123", + "stripe_context": "acct_123", + }, + "data": { + "containing_compartment_id": "compid", + "id": "foo", + "type": "bufo", + }, + } + ) + + @pytest.fixture(scope="function") + def stripe_client(self, http_client_mock): + return stripe.StripeClient( + api_key="keyinfo_test_123", + stripe_context="wksp_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + @pytest.fixture(scope="function") + def parse_thin_event( + self, stripe_client: stripe.StripeClient + ) -> EventParser: + """ + helper to simplify parsing and validating events given a payload + returns a function that has the client pre-bound + """ + + def _parse_thin_event(payload: str): + return stripe_client.parse_thin_event( + payload, generate_header(payload=payload), DUMMY_WEBHOOK_SECRET + ) + + return _parse_thin_event + + def test_parses_thin_event( + self, parse_thin_event: EventParser, v2_payload_no_data: str + ): + event = parse_thin_event(v2_payload_no_data) + + assert isinstance(event, ThinEvent) + assert event.id == "evt_234" + + assert event.related_object + assert event.related_object.id == "fa_123" + + assert event.reason + assert event.reason.id == "foo" + + def test_parses_thin_event_with_data( + self, parse_thin_event: EventParser, v2_payload_with_data: str + ): + event = parse_thin_event(v2_payload_with_data) + + assert isinstance(event, ThinEvent) + assert not hasattr(event, "data") + assert event.reason is None + + def test_validates_signature( + self, stripe_client: stripe.StripeClient, v2_payload_no_data + ): + with pytest.raises(stripe.error.SignatureVerificationError): + stripe_client.parse_thin_event( + v2_payload_no_data, "bad header", DUMMY_WEBHOOK_SECRET + ) diff --git a/tests/test_webhook.py b/tests/test_webhook.py index 53389f725..8c190acb7 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -135,7 +135,7 @@ def test_timestamp_off_but_no_tolerance(self): class TestStripeClientConstructEvent(object): def test_construct_event(self, stripe_mock_stripe_client): header = generate_header() - event = stripe_mock_stripe_client.construct_event( + event = stripe_mock_stripe_client.parse_snapshot_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -144,21 +144,21 @@ def test_raise_on_json_error(self, stripe_mock_stripe_client): payload = "this is not valid JSON" header = generate_header(payload=payload) with pytest.raises(ValueError): - stripe_mock_stripe_client.construct_event( + stripe_mock_stripe_client.parse_snapshot_event( payload, header, DUMMY_WEBHOOK_SECRET ) def test_raise_on_invalid_header(self, stripe_mock_stripe_client): header = "bad_header" with pytest.raises(stripe.error.SignatureVerificationError): - stripe_mock_stripe_client.construct_event( + stripe_mock_stripe_client.parse_snapshot_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) def test_construct_event_from_bytearray(self, stripe_mock_stripe_client): header = generate_header() payload = bytearray(DUMMY_WEBHOOK_PAYLOAD, "utf-8") - event = stripe_mock_stripe_client.construct_event( + event = stripe_mock_stripe_client.parse_snapshot_event( payload, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -166,7 +166,7 @@ def test_construct_event_from_bytearray(self, stripe_mock_stripe_client): def test_construct_event_from_bytes(self, stripe_mock_stripe_client): header = generate_header() payload = bytes(DUMMY_WEBHOOK_PAYLOAD, "utf-8") - event = stripe_mock_stripe_client.construct_event( + event = stripe_mock_stripe_client.parse_snapshot_event( payload, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -181,7 +181,7 @@ def test_construct_event_inherits_requestor(self, http_client_mock): http_client=http_client_mock.get_mock_http_client(), ) header = generate_header() - event = client.construct_event( + event = client.parse_snapshot_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) assert event._requestor == client._requestor From 206b394bac3b52566d9e793a29621d9b1d1d524a Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Tue, 1 Oct 2024 10:01:08 -0700 Subject: [PATCH 22/36] Add Custom requests section to README (#1405) --- README.md | 14 ++++++++++++++ examples/raw_request.py | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 examples/raw_request.py diff --git a/README.md b/README.md index 1723b0e2e..62f399fd0 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,20 @@ If your beta feature requires a `Stripe-Version` header to be sent, set the `str stripe.add_beta_version("feature_beta", "v3") ``` +### Custom requests + +If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `StripeClient`. + +```python +client = StripeClient("sk_test_...") +response = client.raw_request( + "post", "/v1/beta_endpoint", param=123, stripe_version="2022-11-15; feature_beta=v3" +) + +# (Optional) response is a StripeResponse. You can use `client.deserialize` to get a StripeObject. +deserialized_resp = client.deserialize(response, api_mode='V1') +``` + ### Async Asynchronous versions of request-making methods are available by suffixing the method name diff --git a/examples/raw_request.py b/examples/raw_request.py new file mode 100644 index 000000000..5d142f909 --- /dev/null +++ b/examples/raw_request.py @@ -0,0 +1,15 @@ +from stripe import StripeClient + +# Set your API key here +api_key = "{{API_KEY}}" + +client = StripeClient(api_key) +response = client.raw_request( + "post", + "/v1/beta_endpoint", + param=123, + stripe_version="2022-11-15; feature_beta=v3", +) + +# (Optional) response is a StripeResponse. You can use `client.deserialize` to get a StripeObject. +deserialized_resp = client.deserialize(response, api_mode="V1") From ae9cfd183377401f2e1658bcf48c8549301441cd Mon Sep 17 00:00:00 2001 From: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:21:18 -0400 Subject: [PATCH 23/36] Removed parseSnapshotEvent (#1406) --- stripe/_stripe_client.py | 2 +- stripe/v2/_event.py | 18 ++++++++++++++++++ tests/test_webhook.py | 12 ++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index 661c018b1..5ef477d9d 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -283,7 +283,7 @@ def parse_thin_event( return ThinEvent(payload) - def parse_snapshot_event( + def construct_event( self, payload: Union[bytes, str], sig_header: str, diff --git a/stripe/v2/_event.py b/stripe/v2/_event.py index 04c95ca8d..56f160dc0 100644 --- a/stripe/v2/_event.py +++ b/stripe/v2/_event.py @@ -102,11 +102,29 @@ class ThinEvent: """ id: str + """ + Unique identifier for the event. + """ type: str + """ + The type of the event. + """ created: str + """ + Time at which the object was created. + """ context: Optional[str] = None + """ + [Optional] Authentication context needed to fetch the event or related object. + """ related_object: Optional[RelatedObject] = None + """ + [Optional] Object containing the reference to API resource relevant to the event. + """ reason: Optional[Reason] = None + """ + [Optional] Reason for the event. + """ def __init__(self, payload: str) -> None: parsed = json.loads(payload) diff --git a/tests/test_webhook.py b/tests/test_webhook.py index 8c190acb7..53389f725 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -135,7 +135,7 @@ def test_timestamp_off_but_no_tolerance(self): class TestStripeClientConstructEvent(object): def test_construct_event(self, stripe_mock_stripe_client): header = generate_header() - event = stripe_mock_stripe_client.parse_snapshot_event( + event = stripe_mock_stripe_client.construct_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -144,21 +144,21 @@ def test_raise_on_json_error(self, stripe_mock_stripe_client): payload = "this is not valid JSON" header = generate_header(payload=payload) with pytest.raises(ValueError): - stripe_mock_stripe_client.parse_snapshot_event( + stripe_mock_stripe_client.construct_event( payload, header, DUMMY_WEBHOOK_SECRET ) def test_raise_on_invalid_header(self, stripe_mock_stripe_client): header = "bad_header" with pytest.raises(stripe.error.SignatureVerificationError): - stripe_mock_stripe_client.parse_snapshot_event( + stripe_mock_stripe_client.construct_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) def test_construct_event_from_bytearray(self, stripe_mock_stripe_client): header = generate_header() payload = bytearray(DUMMY_WEBHOOK_PAYLOAD, "utf-8") - event = stripe_mock_stripe_client.parse_snapshot_event( + event = stripe_mock_stripe_client.construct_event( payload, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -166,7 +166,7 @@ def test_construct_event_from_bytearray(self, stripe_mock_stripe_client): def test_construct_event_from_bytes(self, stripe_mock_stripe_client): header = generate_header() payload = bytes(DUMMY_WEBHOOK_PAYLOAD, "utf-8") - event = stripe_mock_stripe_client.parse_snapshot_event( + event = stripe_mock_stripe_client.construct_event( payload, header, DUMMY_WEBHOOK_SECRET ) assert isinstance(event, stripe.Event) @@ -181,7 +181,7 @@ def test_construct_event_inherits_requestor(self, http_client_mock): http_client=http_client_mock.get_mock_http_client(), ) header = generate_header() - event = client.parse_snapshot_event( + event = client.construct_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) assert event._requestor == client._requestor From 9bc3689f3736eab961aa937ff9ddee9105b375e9 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 1 Oct 2024 11:35:45 -0700 Subject: [PATCH 24/36] Bump version to 11.0.0 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e71c80fc2..0fc81f549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +## 11.0.0 - 2024-10-01 +* [#1404](https://github.com/stripe/stripe-python/pull/1404) Support for APIs in the new API version 2024-09-30.acacia + + This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading. + + ### ⚠️ Breaking changes due to changes in the API + + + * Rename for `usage_threshold_config` to `usage_threshold` on parameter class `stripe.billing.Alert.CreateParams` and resource `stripe.billing.Alert` + * Remove support for `filter` on parameter class `stripe.billing.Alert.CreateParams` and resource `stripe.billing.Alert`. Use the filters on the `usage_threshold` instead + * * Remove support for `customer_consent_collected` on parameter class `stripe.terminal.Reader.ProcessSetupIntentParams` + + ### ⚠️ Other Breaking changes in the SDK + * Adjusted default values for HTTP requests. You can use the old defaults by setting them explicitly. New values are: + - max retries: `0` -> `2` + - max timeout (seconds): `2` -> `5` + * Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview). Rename `construct_event()` method on the same class to `parse_snapshot_event()` to clearly distinguish between the two kinds of events. + + ### Additions + + * Add support for `custom_unit_amount` on parameter class `stripe.Product.CreateParamsDefaultPriceData` + * Add support for `usage_threshold` on parameter class `stripe.billing.Alert.CreateParams` and resource `stripe.billing.Alert` + * Add support for `allow_redisplay` on parameter classes `stripe.terminal.Reader.ProcessPaymentIntentParamsProcessConfig` and `stripe.terminal.Reader.ProcessSetupIntentParams` + * Add support for `international_transaction` on enum `stripe.treasury.ReceivedCredit.failure_code` + * Add support for `2024-09-30.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version` + * Add support for new Usage Billing APIs `stripe.v2.billing.MeterEvent`, `stripe.v2.billing.MeterEventAdjustments`, `stripe.v2.billing.MeterEventSession`, `stripe.v2.billing.MeterEventStream` and the new Events API `stripe.v2.core.Events` under the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview) + * Add method [rawRequest()](https://github.com/stripe/stripe-python/tree/master?tab=readme-ov-file#custom-requests) on the `StripeClient` class that takes a HTTP method type, url and relevant parameters to make requests to the Stripe API that are not yet supported in the SDK. + + ### Other changes + * Change type of `default_allowed_updates` on `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` from `Union[Literal[''], List[Literal['price', 'promotion_code', 'quantity']]]` to `NotRequired[Literal['']|List[Literal['price', 'promotion_code', 'quantity']]]` + * Change type of `products` on `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` from `Union[Literal[''], List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]]` to `NotRequired[Literal['']|List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]]` + + ## 10.12.0 - 2024-09-18 * [#1394](https://github.com/stripe/stripe-python/pull/1394) Update generated code * Add support for `international_transaction` on enum `stripe.treasury.ReceivedDebit.failure_code` diff --git a/VERSION b/VERSION index c4d592e16..275283a18 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.12.0 +11.0.0 diff --git a/stripe/_version.py b/stripe/_version.py index b20ec0ac7..cbbc18cb3 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.12.0" +VERSION = "11.0.0" From 668f1d46c6cd1c7849f1a47097f0668a4cd40455 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:03:17 -0700 Subject: [PATCH 25/36] Update generated code for v1268 (#1408) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- stripe/__init__.py | 1 - stripe/_invoice.py | 5 ---- stripe/_invoice_line_item.py | 5 ---- stripe/_margin.py | 50 -------------------------------- stripe/_object_classes.py | 1 - stripe/api_resources/__init__.py | 1 - stripe/api_resources/margin.py | 21 -------------- 7 files changed, 84 deletions(-) delete mode 100644 stripe/_margin.py delete mode 100644 stripe/api_resources/margin.py diff --git a/stripe/__init__.py b/stripe/__init__.py index 0300781a1..3f28c4ecd 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -444,7 +444,6 @@ def __getattr__(name): from stripe._login_link import LoginLink as LoginLink from stripe._mandate import Mandate as Mandate from stripe._mandate_service import MandateService as MandateService -from stripe._margin import Margin as Margin from stripe._payment_intent import PaymentIntent as PaymentIntent from stripe._payment_intent_service import ( PaymentIntentService as PaymentIntentService, diff --git a/stripe/_invoice.py b/stripe/_invoice.py index db9966044..3c2bd5886 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -40,7 +40,6 @@ from stripe._customer import Customer from stripe._discount import Discount from stripe._invoice_line_item import InvoiceLineItem - from stripe._margin import Margin from stripe._payment_intent import PaymentIntent from stripe._payment_method import PaymentMethod from stripe._quote import Quote @@ -984,10 +983,6 @@ class TotalPretaxCreditAmount(StripeObject): """ The discount that was applied to get this pretax credit amount. """ - margin: Optional[ExpandableField["Margin"]] - """ - The margin that was applied to get this pretax credit amount. - """ type: Literal["credit_balance_transaction", "discount"] """ Type of the pretax credit amount referenced. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index c81defb72..827490207 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -17,7 +17,6 @@ if TYPE_CHECKING: from stripe._discount import Discount from stripe._invoice_item import InvoiceItem - from stripe._margin import Margin from stripe._plan import Plan from stripe._price import Price from stripe._subscription import Subscription @@ -72,10 +71,6 @@ class PretaxCreditAmount(StripeObject): """ The discount that was applied to get this pretax credit amount. """ - margin: Optional[ExpandableField["Margin"]] - """ - The margin that was applied to get this pretax credit amount. - """ type: Literal["credit_balance_transaction", "discount"] """ Type of the pretax credit amount referenced. diff --git a/stripe/_margin.py b/stripe/_margin.py deleted file mode 100644 index 949e35f9b..000000000 --- a/stripe/_margin.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, Optional -from typing_extensions import Literal - - -class Margin(StripeObject): - """ - A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who - resell products and services and earn a discount (margin) for doing so. - """ - - OBJECT_NAME: ClassVar[Literal["margin"]] = "margin" - active: bool - """ - Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. - """ - created: int - """ - Time at which the object was created. Measured in seconds since the Unix epoch. - """ - id: str - """ - Unique identifier for the object. - """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - metadata: Optional[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - name: Optional[str] - """ - Name of the margin that's displayed on, for example, invoices. - """ - object: Literal["margin"] - """ - String representing the object's type. Objects of the same type share the same value. - """ - percent_off: float - """ - Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. - """ - updated: int - """ - Time at which the object was last updated. Measured in seconds since the Unix epoch. - """ diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index fb0a0ba5b..cbb749a12 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -81,7 +81,6 @@ stripe.LineItem.OBJECT_NAME: stripe.LineItem, stripe.LoginLink.OBJECT_NAME: stripe.LoginLink, stripe.Mandate.OBJECT_NAME: stripe.Mandate, - stripe.Margin.OBJECT_NAME: stripe.Margin, stripe.PaymentIntent.OBJECT_NAME: stripe.PaymentIntent, stripe.PaymentLink.OBJECT_NAME: stripe.PaymentLink, stripe.PaymentMethod.OBJECT_NAME: stripe.PaymentMethod, diff --git a/stripe/api_resources/__init__.py b/stripe/api_resources/__init__.py index d142b58af..99bf65826 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -85,7 +85,6 @@ from stripe.api_resources.list_object import ListObject from stripe.api_resources.login_link import LoginLink from stripe.api_resources.mandate import Mandate - from stripe.api_resources.margin import Margin from stripe.api_resources.payment_intent import PaymentIntent from stripe.api_resources.payment_link import PaymentLink from stripe.api_resources.payment_method import PaymentMethod diff --git a/stripe/api_resources/margin.py b/stripe/api_resources/margin.py deleted file mode 100644 index 2a94240be..000000000 --- a/stripe/api_resources/margin.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.margin package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.margin import Margin - To: - from stripe import Margin - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._margin import ( # noqa - Margin, - ) From e65fcaa92f9a4ca093cf289ea7e119f313c15361 Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:22:45 -0700 Subject: [PATCH 26/36] Add livemode to ThinEvent (#1409) --- stripe/v2/_event.py | 5 +++++ tests/test_v2_event.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/stripe/v2/_event.py b/stripe/v2/_event.py index 56f160dc0..693644b4f 100644 --- a/stripe/v2/_event.py +++ b/stripe/v2/_event.py @@ -111,6 +111,10 @@ class ThinEvent: """ created: str """ + Livemode indicates if the event is from a production(true) or test(false) account. + """ + livemode: bool + """ Time at which the object was created. """ context: Optional[str] = None @@ -132,6 +136,7 @@ def __init__(self, payload: str) -> None: self.id = parsed["id"] self.type = parsed["type"] self.created = parsed["created"] + self.livemode = parsed.get("livemode") self.context = parsed.get("context") if parsed.get("related_object"): self.related_object = RelatedObject(parsed["related_object"]) diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 4fbbc7af7..9ffc910d9 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -18,6 +18,7 @@ def v2_payload_no_data(self): "id": "evt_234", "object": "v2.core.event", "type": "financial_account.balance.opened", + "livemode": True, "created": "2022-02-15T00:27:45.330Z", "related_object": { "id": "fa_123", @@ -39,6 +40,7 @@ def v2_payload_with_data(self): "id": "evt_234", "object": "v2.core.event", "type": "financial_account.balance.opened", + "livemode": False, "created": "2022-02-15T00:27:45.330Z", "related_object": { "id": "fa_123", From 9ad9bfaee1814036da35a7fa0a44088d7548c268 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 3 Oct 2024 15:50:10 -0700 Subject: [PATCH 27/36] Bump version to 11.1.0 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fc81f549..bcc240bd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 11.1.0 - 2024-10-03 +* [#1409](https://github.com/stripe/stripe-python/pull/1409) Update the class for `ThinEvent` to include `livemode` +* [#1408](https://github.com/stripe/stripe-python/pull/1408) Update generated code + * Remove the support for resource `Margin` that was accidentally made public in the last release + ## 11.0.0 - 2024-10-01 * [#1404](https://github.com/stripe/stripe-python/pull/1404) Support for APIs in the new API version 2024-09-30.acacia diff --git a/VERSION b/VERSION index 275283a18..68d8f15e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.0.0 +11.1.0 diff --git a/stripe/_version.py b/stripe/_version.py index cbbc18cb3..e67067092 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.0.0" +VERSION = "11.1.0" From 1e8ee4713feb03880aca8ed3ea677319139400be Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Wed, 9 Oct 2024 16:42:54 -0700 Subject: [PATCH 28/36] Clean up examples (#1412) --- examples/README.md | 11 +++++++--- examples/example_template.py | 22 +++++++++++++++++++ examples/meter_event_stream.py | 12 ++++++++++ examples/new_example.py | 8 ------- ...andler.py => thinevent_webhook_handler.py} | 13 +++++++++++ 5 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 examples/example_template.py delete mode 100644 examples/new_example.py rename examples/{stripe_webhook_handler.py => thinevent_webhook_handler.py} (68%) diff --git a/examples/README.md b/examples/README.md index c73c6149f..d70b4a6ba 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,9 +3,14 @@ From the examples folder, run: `PYTHONPATH=../ python your_example.py` +e.g. + +`PYTHONPATH=../ python thinevent_webhook_handler.py` + ## Adding a new example -1. Clone new_example.py +1. Clone example_template.py 2. Implement your example -3. Run it (as per above) -4. 👍 +3. Fill out the file comment. Include a description and key steps that are being demonstrated. +4. Run it (as per above) +5. 👍 diff --git a/examples/example_template.py b/examples/example_template.py new file mode 100644 index 000000000..8edbed126 --- /dev/null +++ b/examples/example_template.py @@ -0,0 +1,22 @@ +""" +example_template.py - This is a template for defining new examples. It is not intended to be used directly. + + + +In this example, we: + - + - +""" + +import stripe + +# Set your API key here +api_key = "{{API_KEY}}" + +print("Hello world") +# client = stripe.StripeClient(api_key) +# client.v2.... diff --git a/examples/meter_event_stream.py b/examples/meter_event_stream.py index 0d02bb9d8..852decf0e 100644 --- a/examples/meter_event_stream.py +++ b/examples/meter_event_stream.py @@ -1,3 +1,15 @@ +""" +meter_event_stream.py - use the high-throughput meter event stream to report create billing meter events. + +In this example, we: + - create a meter event session and store the session's authentication token + - define an event with a payload + - use the meter_event_stream service accessor in StripeClient to create an event stream that reports this event + +This example expects a billing meter with an event_name of 'alpaca_ai_tokens'. If you have +a different meter event name, you can change it before running this example. +""" + from datetime import datetime, timezone import stripe diff --git a/examples/new_example.py b/examples/new_example.py deleted file mode 100644 index 53a93e7e6..000000000 --- a/examples/new_example.py +++ /dev/null @@ -1,8 +0,0 @@ -import stripe - -# Set your API key here -api_key = "{{API_KEY}}" - -print("Hello world") -# client = stripe.StripeClient(api_key) -# client.v2.... diff --git a/examples/stripe_webhook_handler.py b/examples/thinevent_webhook_handler.py similarity index 68% rename from examples/stripe_webhook_handler.py rename to examples/thinevent_webhook_handler.py index e4452d9c7..f93e0a560 100644 --- a/examples/stripe_webhook_handler.py +++ b/examples/thinevent_webhook_handler.py @@ -1,3 +1,16 @@ +""" +thinevent_webhook_handler.py - receive and process thin events like the +v1.billing.meter.error_report_triggered event. + +In this example, we: + - create a StripeClient called client + - use client.parse_thin_event to parse the received thin event webhook body + - call client.v2.core.events.retrieve to retrieve the full event object + - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call + event.fetchRelatedObject to retrieve the Billing Meter object associated + with the event. +""" + import os from stripe import StripeClient from stripe.events import V1BillingMeterErrorReportTriggeredEvent From 62e89af8abe9f80abba1d8991f1a54abd1d9e881 Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:17:04 -0700 Subject: [PATCH 29/36] update object tags for meter-related classes (#1415) * update object tags * fix tests --- stripe/v2/billing/_meter_event.py | 6 +++--- stripe/v2/billing/_meter_event_adjustment.py | 6 +++--- stripe/v2/billing/_meter_event_session.py | 6 +++--- tests/test_raw_request.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/stripe/v2/billing/_meter_event.py b/stripe/v2/billing/_meter_event.py index ce33c36cd..9d5a304dd 100644 --- a/stripe/v2/billing/_meter_event.py +++ b/stripe/v2/billing/_meter_event.py @@ -10,8 +10,8 @@ class MeterEvent(StripeObject): Fix me empty_doc_string. """ - OBJECT_NAME: ClassVar[Literal["billing.meter_event"]] = ( - "billing.meter_event" + OBJECT_NAME: ClassVar[Literal["v2.billing.meter_event"]] = ( + "v2.billing.meter_event" ) created: str """ @@ -29,7 +29,7 @@ class MeterEvent(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - object: Literal["billing.meter_event"] + object: Literal["v2.billing.meter_event"] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py index 7561e67ba..662e8b9bc 100644 --- a/stripe/v2/billing/_meter_event_adjustment.py +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -6,8 +6,8 @@ class MeterEventAdjustment(StripeObject): - OBJECT_NAME: ClassVar[Literal["billing.meter_event_adjustment"]] = ( - "billing.meter_event_adjustment" + OBJECT_NAME: ClassVar[Literal["v2.billing.meter_event_adjustment"]] = ( + "v2.billing.meter_event_adjustment" ) class Cancel(StripeObject): @@ -36,7 +36,7 @@ class Cancel(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - object: Literal["billing.meter_event_adjustment"] + object: Literal["v2.billing.meter_event_adjustment"] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/stripe/v2/billing/_meter_event_session.py b/stripe/v2/billing/_meter_event_session.py index f1d96650e..8a6d47538 100644 --- a/stripe/v2/billing/_meter_event_session.py +++ b/stripe/v2/billing/_meter_event_session.py @@ -6,8 +6,8 @@ class MeterEventSession(StripeObject): - OBJECT_NAME: ClassVar[Literal["billing.meter_event_session"]] = ( - "billing.meter_event_session" + OBJECT_NAME: ClassVar[Literal["v2.billing.meter_event_session"]] = ( + "v2.billing.meter_event_session" ) authentication_token: str """ @@ -30,7 +30,7 @@ class MeterEventSession(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - object: Literal["billing.meter_event_session"] + object: Literal["v2.billing.meter_event_session"] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/tests/test_raw_request.py b/tests/test_raw_request.py index 459b0d98b..94d493f8b 100644 --- a/tests/test_raw_request.py +++ b/tests/test_raw_request.py @@ -72,7 +72,7 @@ def test_preview_request_post( http_client_mock.stub_request( "post", path=self.POST_REL_URL_V2, - rbody='{"id": "bmes_123", "object": "billing.meter_event_session"}', + rbody='{"id": "bmes_123", "object": "v2.billing.meter_event_session"}', rcode=200, rheaders={}, ) From acd1bccfdfae25259404801aeff107d24726fe0f Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:38:28 -0700 Subject: [PATCH 30/36] Deserialize into correct v2 EventData types (#1414) * Add event data deserialization * Fix python attribute checking * fix pr feedback --- ...ling_meter_error_report_triggered_event.py | 29 ++++++++- .../_v1_billing_meter_no_meter_found_event.py | 29 ++++++++- tests/test_v2_event.py | 60 +++++++++++++++---- 3 files changed, 103 insertions(+), 15 deletions(-) diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py index f20157177..a3af378fb 100644 --- a/stripe/events/_v1_billing_meter_error_report_triggered_event.py +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.billing._meter import Meter from stripe.v2._event import Event -from typing import List, cast +from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal @@ -88,6 +91,30 @@ class Request(StripeObject): Data for the v1.billing.meter.error_report_triggered event """ + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1BillingMeterErrorReportTriggeredEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1BillingMeterErrorReportTriggeredEvent.V1BillingMeterErrorReportTriggeredEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + class RelatedObject(StripeObject): id: str """ diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py index 680c094aa..5f8d64479 100644 --- a/stripe/events/_v1_billing_meter_no_meter_found_event.py +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -1,8 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.v2._event import Event -from typing import List +from typing import Any, Dict, List, Optional from typing_extensions import Literal @@ -86,3 +89,27 @@ class Request(StripeObject): """ Data for the v1.billing.meter.no_meter_found event """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1BillingMeterNoMeterFoundEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1BillingMeterNoMeterFoundEvent.V1BillingMeterNoMeterFoundEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 9ffc910d9..32bd3fabb 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -5,6 +5,9 @@ import stripe from stripe import ThinEvent +from stripe.events._v1_billing_meter_error_report_triggered_event import ( + V1BillingMeterErrorReportTriggeredEvent, +) from tests.test_webhook import DUMMY_WEBHOOK_SECRET, generate_header EventParser = Callable[[str], ThinEvent] @@ -17,13 +20,13 @@ def v2_payload_no_data(self): { "id": "evt_234", "object": "v2.core.event", - "type": "financial_account.balance.opened", + "type": "v1.billing.meter.error_report_triggered", "livemode": True, "created": "2022-02-15T00:27:45.330Z", "related_object": { - "id": "fa_123", - "type": "financial_account", - "url": "/https/github.com/v2/financial_accounts/fa_123", + "id": "mtr_123", + "type": "billing.meter", + "url": "/https/github.com/v1/billing/meters/mtr_123", "stripe_context": "acct_123", }, "reason": { @@ -39,19 +42,19 @@ def v2_payload_with_data(self): { "id": "evt_234", "object": "v2.core.event", - "type": "financial_account.balance.opened", + "type": "v1.billing.meter.error_report_triggered", "livemode": False, "created": "2022-02-15T00:27:45.330Z", + "context": "acct_123", "related_object": { - "id": "fa_123", - "type": "financial_account", - "url": "/https/github.com/v2/financial_accounts/fa_123", - "stripe_context": "acct_123", + "id": "mtr_123", + "type": "billing.meter", + "url": "/https/github.com/v1/billing/meters/mtr_123", }, "data": { - "containing_compartment_id": "compid", - "id": "foo", - "type": "bufo", + "reason": { + "error_count": 1, + } }, } ) @@ -89,7 +92,7 @@ def test_parses_thin_event( assert event.id == "evt_234" assert event.related_object - assert event.related_object.id == "fa_123" + assert event.related_object.id == "mtr_123" assert event.reason assert event.reason.id == "foo" @@ -110,3 +113,34 @@ def test_validates_signature( stripe_client.parse_thin_event( v2_payload_no_data, "bad header", DUMMY_WEBHOOK_SECRET ) + + def test_v2_events_data_type(self, http_client_mock, v2_payload_with_data): + method = "get" + path = "/v2/core/events/evt_123" + http_client_mock.stub_request( + method, + path=path, + rbody=v2_payload_with_data, + rcode=200, + rheaders={}, + ) + client = stripe.StripeClient( + api_key="keyinfo_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + event = client.v2.core.events.retrieve("evt_123") + + http_client_mock.assert_requested( + method, + api_base=stripe.DEFAULT_API_BASE, + path=path, + api_key="keyinfo_test_123", + ) + assert event.id is not None + assert isinstance(event, V1BillingMeterErrorReportTriggeredEvent) + assert event.data is not None + assert isinstance( + event.data, + V1BillingMeterErrorReportTriggeredEvent.V1BillingMeterErrorReportTriggeredEventData, + ) + assert event.data.reason.error_count == 1 From d53a190ef5bf8a1ebbc683af2af3b601770589da Mon Sep 17 00:00:00 2001 From: David Brownman Date: Fri, 18 Oct 2024 11:42:23 -0700 Subject: [PATCH 31/36] Bump version to 11.1.1 --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcc240bd7..e89347ffc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 11.1.1 - 2024-10-18 +* [#1414](https://github.com/stripe/stripe-python/pull/1414) Deserialize into correct v2 EventData types + * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent` +* [#1415](https://github.com/stripe/stripe-python/pull/1415) update object tags for meter-related classes + + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. +* [#1412](https://github.com/stripe/stripe-python/pull/1412) Clean up examples + ## 11.1.0 - 2024-10-03 * [#1409](https://github.com/stripe/stripe-python/pull/1409) Update the class for `ThinEvent` to include `livemode` * [#1408](https://github.com/stripe/stripe-python/pull/1408) Update generated code diff --git a/VERSION b/VERSION index 68d8f15e2..668182d21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.0 +11.1.1 diff --git a/stripe/_version.py b/stripe/_version.py index e67067092..043e1f3c1 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.1.0" +VERSION = "11.1.1" From f71b687b9ab5f722c58c56659d6d078775de50c0 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:14:41 -0700 Subject: [PATCH 32/36] Update generated code (#1411) * Update generated code for v1268 * Update generated code for v1314 * Update generated code for v1315 * Update generated code for v1317 * Update generated code for v1318 * Update generated code for v1318 * Update generated code for v1319 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 129 +++- stripe/_account_login_link_service.py | 4 +- stripe/_account_service.py | 168 ++++- stripe/_account_session.py | 62 +- stripe/_account_session_service.py | 30 +- stripe/_api_version.py | 2 +- stripe/_charge.py | 78 +++ stripe/_confirmation_token.py | 136 +++- stripe/_credit_note.py | 9 +- stripe/_credit_note_line_item.py | 3 + stripe/_credit_note_preview_lines_service.py | 2 +- stripe/_credit_note_service.py | 4 +- stripe/_customer.py | 34 +- stripe/_customer_payment_method_service.py | 6 + stripe/_customer_service.py | 20 +- stripe/_customer_tax_id_service.py | 8 +- stripe/_dispute.py | 344 ++++++++++ stripe/_dispute_service.py | 166 +++++ stripe/_event.py | 2 + stripe/_invoice.py | 60 +- stripe/_invoice_line_item.py | 4 + stripe/_invoice_line_item_service.py | 1 + stripe/_invoice_service.py | 34 +- stripe/_invoice_upcoming_lines_service.py | 10 +- stripe/_mandate.py | 10 + stripe/_object_classes.py | 1 + stripe/_payment_intent.py | 617 +++++++++++++++++- stripe/_payment_intent_service.py | 561 +++++++++++++++- stripe/_payment_link.py | 4 +- stripe/_payment_link_service.py | 3 +- stripe/_payment_method.py | 140 +++- stripe/_payment_method_configuration.py | 64 +- .../_payment_method_configuration_service.py | 40 +- stripe/_payment_method_domain.py | 22 + stripe/_payment_method_service.py | 69 +- stripe/_person.py | 2 +- stripe/_refund.py | 8 +- stripe/_setup_attempt.py | 10 + stripe/_setup_intent.py | 179 ++++- stripe/_setup_intent_service.py | 195 +++++- stripe/_subscription.py | 13 +- stripe/_subscription_service.py | 8 +- stripe/_tax_id.py | 16 +- stripe/_tax_id_service.py | 8 +- stripe/_tax_rate.py | 24 + stripe/_tax_rate_service.py | 2 + stripe/_token.py | 6 +- stripe/_token_service.py | 6 +- stripe/_usage_record_summary.py | 4 + stripe/_webhook_endpoint.py | 5 + stripe/_webhook_endpoint_service.py | 5 + stripe/billing/_credit_balance_summary.py | 12 +- .../_credit_balance_summary_service.py | 4 +- stripe/billing/_credit_balance_transaction.py | 20 +- stripe/billing/_credit_grant.py | 31 +- stripe/billing/_credit_grant_service.py | 12 +- stripe/billing/_meter.py | 2 + stripe/billing_portal/_configuration.py | 71 +- .../billing_portal/_configuration_service.py | 50 +- stripe/checkout/_session.py | 142 +++- stripe/checkout/_session_service.py | 78 +++ stripe/forwarding/_request.py | 10 +- stripe/forwarding/_request_service.py | 6 +- stripe/issuing/_card.py | 118 +++- stripe/issuing/_card_service.py | 2 +- stripe/tax/_calculation.py | 37 +- stripe/tax/_calculation_line_item.py | 1 + stripe/tax/_calculation_service.py | 8 +- stripe/tax/_registration.py | 164 +++++ stripe/tax/_registration_service.py | 91 +++ stripe/tax/_transaction.py | 9 +- stripe/terminal/_configuration.py | 52 ++ stripe/terminal/_configuration_service.py | 36 + .../_confirmation_token_service.py | 65 +- stripe/test_helpers/issuing/_card_service.py | 50 ++ stripe/treasury/_financial_account.py | 2 +- stripe/v2/__init__.py | 1 + stripe/v2/_core_service.py | 2 + stripe/v2/_event_destination.py | 124 ++++ stripe/v2/core/__init__.py | 3 + stripe/v2/core/_event_destination_service.py | 478 ++++++++++++++ stripe/v2/core/_event_service.py | 2 +- 83 files changed, 4856 insertions(+), 167 deletions(-) create mode 100644 stripe/v2/_event_destination.py create mode 100644 stripe/v2/core/_event_destination_service.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8f166ae2e..c626f7dd8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1268 \ No newline at end of file +v1319 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index db36e83a8..b13e39411 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -170,6 +170,10 @@ class Capabilities(StripeObject): """ The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. """ + alma_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Alma capability of the account, or whether the account can directly process Alma payments. + """ amazon_pay_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. @@ -262,6 +266,10 @@ class Capabilities(StripeObject): """ 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. """ + kakao_pay_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + """ 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 +278,10 @@ class Capabilities(StripeObject): """ The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. """ + kr_card_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + """ legacy_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the legacy payments capability of the account. @@ -292,6 +304,10 @@ class Capabilities(StripeObject): """ 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. """ + naver_pay_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + """ 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. @@ -300,6 +316,10 @@ class Capabilities(StripeObject): """ The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. """ + payco_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Payco capability of the account, or whether the account can directly process Payco payments. + """ paynow_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. @@ -314,6 +334,12 @@ class Capabilities(StripeObject): """ The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. """ + samsung_pay_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + """ sepa_bank_transfer_payments: Optional[ Literal["active", "inactive", "pending"] ] @@ -794,6 +820,12 @@ class Error(StripeObject): """ _inner_class_types = {"alternatives": Alternative, "errors": Error} + class Groups(StripeObject): + payments_pricing: Optional[str] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class Requirements(StripeObject): class Alternative(StripeObject): alternative_fields_due: List[str] @@ -1292,6 +1324,10 @@ class CreateParams(RequestOptions): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["Account.CreateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["Account.CreateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -1461,6 +1497,12 @@ class CreateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "Account.CreateParamsCapabilitiesAmazonPayPayments" ] @@ -1581,6 +1623,12 @@ class CreateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "Account.CreateParamsCapabilitiesKlarnaPayments" ] @@ -1593,6 +1641,12 @@ class CreateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "Account.CreateParamsCapabilitiesLegacyPayments" ] @@ -1623,6 +1677,12 @@ class CreateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "Account.CreateParamsCapabilitiesOxxoPayments" ] @@ -1635,6 +1695,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "Account.CreateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "Account.CreateParamsCapabilitiesPaynowPayments" ] @@ -1653,6 +1719,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "Account.CreateParamsCapabilitiesSepaBankTransferPayments" ] @@ -1740,6 +1812,12 @@ class CreateParamsCapabilitiesAfterpayClearpayPayments(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 CreateParamsCapabilitiesAlmaPayments(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 CreateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -1860,6 +1938,12 @@ class CreateParamsCapabilitiesJpBankTransferPayments(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 CreateParamsCapabilitiesKakaoPayPayments(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] """ @@ -1872,6 +1956,12 @@ class CreateParamsCapabilitiesKonbiniPayments(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 CreateParamsCapabilitiesKrCardPayments(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 CreateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -1902,6 +1992,12 @@ class CreateParamsCapabilitiesMxBankTransferPayments(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 CreateParamsCapabilitiesNaverPayPayments(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] """ @@ -1914,6 +2010,12 @@ class CreateParamsCapabilitiesP24Payments(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 CreateParamsCapabilitiesPaycoPayments(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 CreateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -1932,6 +2034,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 CreateParamsCapabilitiesSamsungPayPayments(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 CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -2353,6 +2461,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class CreateParamsIndividual(TypedDict): address: NotRequired["Account.CreateParamsIndividualAddress"] """ @@ -2394,7 +2508,7 @@ class CreateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -3865,7 +3979,7 @@ class RetrievePersonParams(RequestOptions): capabilities: Optional[Capabilities] charges_enabled: Optional[bool] """ - Whether the account can create live charges. + Whether the account can process charges. """ company: Optional[Company] controller: Optional[Controller] @@ -3894,6 +4008,10 @@ class RetrievePersonParams(RequestOptions): External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. """ future_requirements: Optional[FutureRequirements] + groups: Optional[Groups] + """ + The groups associated with the account. + """ id: str """ Unique identifier for the object. @@ -3916,7 +4034,7 @@ class RetrievePersonParams(RequestOptions): """ payouts_enabled: Optional[bool] """ - Whether Stripe can send payouts to this account. + Whether the funds in this account can be paid out. """ requirements: Optional[Requirements] settings: Optional[Settings] @@ -4790,7 +4908,7 @@ def create_login_link( cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] ) -> "LoginLink": """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -4810,7 +4928,7 @@ async def create_login_link_async( cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] ) -> "LoginLink": """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -5029,6 +5147,7 @@ async def list_persons_async( "company": Company, "controller": Controller, "future_requirements": FutureRequirements, + "groups": Groups, "requirements": Requirements, "settings": Settings, "tos_acceptance": TosAcceptance, diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py index aa3d3dc7d..0d1d0a30c 100644 --- a/stripe/_account_login_link_service.py +++ b/stripe/_account_login_link_service.py @@ -22,7 +22,7 @@ def create( options: RequestOptions = {}, ) -> LoginLink: """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ @@ -46,7 +46,7 @@ async def create_async( options: RequestOptions = {}, ) -> LoginLink: """ - Creates a single-use login link for a connected account to access the Express Dashboard. + Creates a login link for a connected account to access the Express Dashboard. You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index bf8142bc8..9d973845c 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -87,6 +87,10 @@ class CreateParams(TypedDict): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["AccountService.CreateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["AccountService.CreateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -256,6 +260,12 @@ class CreateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesAmazonPayPayments" ] @@ -376,6 +386,12 @@ class CreateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesKlarnaPayments" ] @@ -388,6 +404,12 @@ class CreateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesLegacyPayments" ] @@ -418,6 +440,12 @@ class CreateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesOxxoPayments" ] @@ -430,6 +458,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesPaynowPayments" ] @@ -448,6 +482,12 @@ class CreateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesSepaBankTransferPayments" ] @@ -539,6 +579,12 @@ class CreateParamsCapabilitiesAfterpayClearpayPayments(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 CreateParamsCapabilitiesAlmaPayments(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 CreateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -659,6 +705,12 @@ class CreateParamsCapabilitiesJpBankTransferPayments(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 CreateParamsCapabilitiesKakaoPayPayments(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] """ @@ -671,6 +723,12 @@ class CreateParamsCapabilitiesKonbiniPayments(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 CreateParamsCapabilitiesKrCardPayments(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 CreateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -701,6 +759,12 @@ class CreateParamsCapabilitiesMxBankTransferPayments(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 CreateParamsCapabilitiesNaverPayPayments(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] """ @@ -713,6 +777,12 @@ class CreateParamsCapabilitiesP24Payments(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 CreateParamsCapabilitiesPaycoPayments(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 CreateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -731,6 +801,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 CreateParamsCapabilitiesSamsungPayPayments(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 CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -1158,6 +1234,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class CreateParamsIndividual(TypedDict): address: NotRequired["AccountService.CreateParamsIndividualAddress"] """ @@ -1203,7 +1285,7 @@ class CreateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1777,6 +1859,10 @@ class UpdateParams(TypedDict): By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + groups: NotRequired["AccountService.UpdateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to + """ individual: NotRequired["AccountService.UpdateParamsIndividual"] """ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -1942,6 +2028,12 @@ class UpdateParamsCapabilities(TypedDict): """ The afterpay_clearpay_payments capability. """ + alma_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesAlmaPayments" + ] + """ + The alma_payments capability. + """ amazon_pay_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesAmazonPayPayments" ] @@ -2062,6 +2154,12 @@ class UpdateParamsCapabilities(TypedDict): """ The jp_bank_transfer_payments capability. """ + kakao_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ klarna_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesKlarnaPayments" ] @@ -2074,6 +2172,12 @@ class UpdateParamsCapabilities(TypedDict): """ The konbini_payments capability. """ + kr_card_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ legacy_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesLegacyPayments" ] @@ -2104,6 +2208,12 @@ class UpdateParamsCapabilities(TypedDict): """ The mx_bank_transfer_payments capability. """ + naver_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ oxxo_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesOxxoPayments" ] @@ -2116,6 +2226,12 @@ class UpdateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + payco_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesPaycoPayments" + ] + """ + The payco_payments capability. + """ paynow_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesPaynowPayments" ] @@ -2134,6 +2250,12 @@ class UpdateParamsCapabilities(TypedDict): """ The revolut_pay_payments capability. """ + samsung_pay_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ sepa_bank_transfer_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesSepaBankTransferPayments" ] @@ -2225,6 +2347,12 @@ class UpdateParamsCapabilitiesAfterpayClearpayPayments(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 UpdateParamsCapabilitiesAlmaPayments(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 UpdateParamsCapabilitiesAmazonPayPayments(TypedDict): requested: NotRequired[bool] """ @@ -2345,6 +2473,12 @@ class UpdateParamsCapabilitiesJpBankTransferPayments(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 UpdateParamsCapabilitiesKakaoPayPayments(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] """ @@ -2357,6 +2491,12 @@ class UpdateParamsCapabilitiesKonbiniPayments(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 UpdateParamsCapabilitiesKrCardPayments(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 UpdateParamsCapabilitiesLegacyPayments(TypedDict): requested: NotRequired[bool] """ @@ -2387,6 +2527,12 @@ class UpdateParamsCapabilitiesMxBankTransferPayments(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 UpdateParamsCapabilitiesNaverPayPayments(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] """ @@ -2399,6 +2545,12 @@ class UpdateParamsCapabilitiesP24Payments(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 UpdateParamsCapabilitiesPaycoPayments(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 UpdateParamsCapabilitiesPaynowPayments(TypedDict): requested: NotRequired[bool] """ @@ -2417,6 +2569,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 UpdateParamsCapabilitiesSamsungPayPayments(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 UpdateParamsCapabilitiesSepaBankTransferPayments(TypedDict): requested: NotRequired[bool] """ @@ -2806,6 +2964,12 @@ class UpdateParamsDocumentsProofOfRegistration(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class UpdateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + class UpdateParamsIndividual(TypedDict): address: NotRequired["AccountService.UpdateParamsIndividualAddress"] """ @@ -2851,7 +3015,7 @@ class UpdateParamsIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 4b844424d..eee61b8fb 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, cast +from typing import ClassVar, List, Optional, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack @@ -23,9 +23,13 @@ class AccountSession(CreateableAPIResource["AccountSession"]): class Components(StripeObject): class AccountManagement(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -37,9 +41,13 @@ class Features(StripeObject): class AccountOnboarding(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -51,13 +59,17 @@ class Features(StripeObject): class Balances(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: bool """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: bool """ @@ -88,9 +100,13 @@ class Features(StripeObject): class NotificationBanner(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ enabled: bool @@ -154,13 +170,17 @@ class Features(StripeObject): class Payouts(StripeObject): class Features(StripeObject): + disable_stripe_user_authentication: Optional[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: bool """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: bool """ @@ -325,9 +345,13 @@ class CreateParamsComponentsAccountManagement(TypedDict): """ class CreateParamsComponentsAccountManagementFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -343,9 +367,13 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsBalances(TypedDict): @@ -361,13 +389,17 @@ class CreateParamsComponentsBalances(TypedDict): """ class CreateParamsComponentsBalancesFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ @@ -406,9 +438,13 @@ class CreateParamsComponentsNotificationBanner(TypedDict): """ class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -484,13 +520,17 @@ class CreateParamsComponentsPayouts(TypedDict): """ class CreateParamsComponentsPayoutsFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 52ea8afa3..fbdf22315 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -103,9 +103,13 @@ class CreateParamsComponentsAccountManagement(TypedDict): """ class CreateParamsComponentsAccountManagementFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -121,9 +125,13 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsBalances(TypedDict): @@ -139,13 +147,17 @@ class CreateParamsComponentsBalances(TypedDict): """ class CreateParamsComponentsBalancesFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ @@ -184,9 +196,13 @@ class CreateParamsComponentsNotificationBanner(TypedDict): """ class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -262,13 +278,17 @@ class CreateParamsComponentsPayouts(TypedDict): """ class CreateParamsComponentsPayoutsFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + """ edit_payout_schedule: NotRequired[bool] """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ diff --git a/stripe/_api_version.py b/stripe/_api_version.py index e23615373..16c42a5c5 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-09-30.acacia" + CURRENT = "2024-10-28.acacia" diff --git a/stripe/_charge.py b/stripe/_charge.py index 9d0463bd5..3a08da9f8 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -282,6 +282,9 @@ class Alipay(StripeObject): Transaction ID of this particular Alipay transaction. """ + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -1285,6 +1288,12 @@ class Receipt(StripeObject): """ _inner_class_types = {"receipt": Receipt} + class KakaoPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Klarna(StripeObject): class PayerDetails(StripeObject): class Address(StripeObject): @@ -1330,6 +1339,45 @@ class Store(StripeObject): """ _inner_class_types = {"store": Store} + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): country: Optional[str] """ @@ -1376,6 +1424,12 @@ class Multibanco(StripeObject): Reference number associated with this Multibanco payment. """ + class NaverPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Oxxo(StripeObject): number: Optional[str] """ @@ -1427,6 +1481,12 @@ class P24(StripeObject): Przelewy24 rarely provides this information so the attribute is usually empty. """ + class Payco(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class Paynow(StripeObject): reference: Optional[str] """ @@ -1487,6 +1547,12 @@ class Promptpay(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ + class SepaCreditTransfer(StripeObject): bank_name: Optional[str] """ @@ -1645,6 +1711,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1661,18 +1728,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] @@ -1696,6 +1768,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1712,18 +1785,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, "sofort": Sofort, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 239f20322..4afa0d288 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -107,6 +107,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -1026,6 +1029,9 @@ class Networks(StripeObject): """ _inner_class_types = {"networks": Networks} + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): class Dob(StripeObject): day: Optional[int] @@ -1050,6 +1056,41 @@ class Dob(StripeObject): class Konbini(StripeObject): pass + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): email: Optional[str] """ @@ -1066,6 +1107,12 @@ class Mobilepay(StripeObject): class Multibanco(StripeObject): pass + class NaverPay(StripeObject): + funding: Literal["card", "points"] + """ + Whether to fund this transaction with Naver Pay points or a card. + """ + class Oxxo(StripeObject): pass @@ -1104,6 +1151,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class Payco(StripeObject): + pass + class Paynow(StripeObject): pass @@ -1127,6 +1177,9 @@ class Promptpay(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + pass + class SepaDebit(StripeObject): class GeneratedFrom(StripeObject): charge: Optional[ExpandableField["Charge"]] @@ -1280,6 +1333,7 @@ class Zip(StripeObject): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1301,18 +1355,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1322,6 +1381,7 @@ class Zip(StripeObject): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1338,18 +1398,23 @@ class Zip(StripeObject): "grabpay", "ideal", "interac_present", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1369,6 +1434,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1386,18 +1452,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -1506,6 +1577,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1592,6 +1669,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataKlarna" ] @@ -1604,6 +1687,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataLink" ] @@ -1626,6 +1715,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataOxxo" ] @@ -1636,6 +1731,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataPaynow" ] @@ -1670,6 +1771,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataSepaDebit" ] @@ -1699,6 +1806,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1712,18 +1820,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1775,6 +1888,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1960,12 +2076,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataKlarnaDob" @@ -1991,6 +2110,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -2000,6 +2122,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2038,6 +2166,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2059,6 +2190,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 6e5ae51ff..0d298d755 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -245,7 +245,7 @@ class CreateParams(RequestOptions): class CreateParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -462,7 +462,7 @@ class PreviewLinesParams(RequestOptions): class PreviewLinesParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -587,7 +587,7 @@ class PreviewParams(RequestOptions): class PreviewParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -735,6 +735,9 @@ class VoidCreditNoteParams(RequestOptions): The link to download the PDF of the credit note. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + """ reason: Optional[ Literal[ "duplicate", "fraudulent", "order_change", "product_unsatisfactory" diff --git a/stripe/_credit_note_line_item.py b/stripe/_credit_note_line_item.py index 04505cf83..9b22896f8 100644 --- a/stripe/_credit_note_line_item.py +++ b/stripe/_credit_note_line_item.py @@ -129,6 +129,9 @@ class TaxAmount(StripeObject): String representing the object's type. Objects of the same type share the same value. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + """ quantity: Optional[int] """ The number of units of product being credited. diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index 10cc91426..bce76c93a 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -93,7 +93,7 @@ class ListParams(TypedDict): class ListParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 774b1a8c8..f68cf465d 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -89,7 +89,7 @@ class CreateParams(TypedDict): class CreateParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ @@ -264,7 +264,7 @@ class PreviewParams(TypedDict): class PreviewParamsLine(TypedDict): amount: NotRequired[int] """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive """ description: NotRequired[str] """ diff --git a/stripe/_customer.py b/stripe/_customer.py index 001126339..a4a2b108d 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -382,7 +382,7 @@ class CreateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -481,7 +481,7 @@ class CreateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -522,6 +522,7 @@ class CreateParamsTaxIdDatum(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -557,6 +558,8 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -580,15 +583,18 @@ class CreateParamsTaxIdDatum(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -626,6 +632,7 @@ class CreateTaxIdParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -661,6 +668,8 @@ class CreateTaxIdParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -684,15 +693,18 @@ class CreateTaxIdParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -845,6 +857,7 @@ class ListPaymentMethodsParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -859,18 +872,23 @@ class ListPaymentMethodsParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1046,7 +1064,7 @@ class ModifyParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1145,7 +1163,7 @@ class ModifyParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1169,7 +1187,9 @@ class ModifyParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["deferred", "immediately"]] + validate_location: NotRequired[ + Literal["auto", "deferred", "immediately"] + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. """ diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index e1749bf91..6bc307d5b 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -39,6 +39,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -53,18 +54,23 @@ class ListParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 100c7c367..9caaa851d 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -142,7 +142,7 @@ class CreateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -243,7 +243,7 @@ class CreateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -284,6 +284,7 @@ class CreateParamsTaxIdDatum(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -319,6 +320,8 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -342,15 +345,18 @@ class CreateParamsTaxIdDatum(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -529,7 +535,7 @@ class UpdateParamsAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -630,7 +636,7 @@ class UpdateParamsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -654,7 +660,9 @@ class UpdateParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["deferred", "immediately"]] + validate_location: NotRequired[ + Literal["auto", "deferred", "immediately"] + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. """ diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index af1ce221e..6ba3e2efd 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -26,6 +26,7 @@ class CreateParams(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -61,6 +62,8 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -84,15 +87,18 @@ class CreateParams(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_dispute.py b/stripe/_dispute.py index e75cf056f..22f5c33e1 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -37,6 +37,150 @@ class Dispute( OBJECT_NAME: ClassVar[Literal["dispute"]] = "dispute" class Evidence(StripeObject): + class EnhancedEvidence(StripeObject): + class VisaCompellingEvidence3(StripeObject): + class DisputedTransaction(StripeObject): + class ShippingAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + customer_account_id: Optional[str] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: Optional[str] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: Optional[str] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: Optional[str] + """ + The email address of the customer. + """ + customer_purchase_ip: Optional[str] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: Optional[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: Optional[str] + """ + A description of the product or service that was sold. + """ + shipping_address: Optional[ShippingAddress] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = {"shipping_address": ShippingAddress} + + class PriorUndisputedTransaction(StripeObject): + class ShippingAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: Optional[str] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: Optional[str] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: Optional[str] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: Optional[str] + """ + The email address of the customer. + """ + customer_purchase_ip: Optional[str] + """ + The IP address that the customer used when making the purchase. + """ + product_description: Optional[str] + """ + A description of the product or service that was sold. + """ + shipping_address: Optional[ShippingAddress] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = {"shipping_address": ShippingAddress} + + disputed_transaction: Optional[DisputedTransaction] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: List[PriorUndisputedTransaction] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + _inner_class_types = { + "disputed_transaction": DisputedTransaction, + "prior_undisputed_transactions": PriorUndisputedTransaction, + } + + visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] + _inner_class_types = { + "visa_compelling_evidence_3": VisaCompellingEvidence3, + } + access_activity_log: Optional[str] """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -89,6 +233,7 @@ class Evidence(StripeObject): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: EnhancedEvidence product_description: Optional[str] """ A description of the product or service that was sold. @@ -145,12 +290,40 @@ class Evidence(StripeObject): """ Any additional evidence or statements. """ + _inner_class_types = {"enhanced_evidence": EnhancedEvidence} class EvidenceDetails(StripeObject): + class EnhancedEligibility(StripeObject): + class VisaCompellingEvidence3(StripeObject): + required_actions: List[ + Literal[ + "missing_customer_identifiers", + "missing_disputed_transaction_description", + "missing_merchandise_or_services", + "missing_prior_undisputed_transaction_description", + "missing_prior_undisputed_transactions", + ] + ] + """ + List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + """ + status: Literal[ + "not_qualified", "qualified", "requires_action" + ] + """ + Visa Compelling Evidence 3.0 eligibility status. + """ + + visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] + _inner_class_types = { + "visa_compelling_evidence_3": VisaCompellingEvidence3, + } + due_by: Optional[int] """ Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. """ + enhanced_eligibility: EnhancedEligibility has_evidence: bool """ Whether evidence has been staged for this dispute. @@ -163,6 +336,7 @@ class EvidenceDetails(StripeObject): """ The number of times evidence has been submitted. Typically, you may only submit evidence once. """ + _inner_class_types = {"enhanced_eligibility": EnhancedEligibility} class PaymentMethodDetails(StripeObject): class AmazonPay(StripeObject): @@ -341,6 +515,12 @@ class ModifyParamsEvidence(TypedDict): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ product_description: NotRequired[str] """ A description of the product or service that was sold. Has a maximum character count of 20,000. @@ -398,6 +578,166 @@ class ModifyParamsEvidence(TypedDict): Any additional evidence or statements. Has a maximum character count of 20,000. """ + class ModifyParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, + ): + disputed_transaction: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, + ): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, + ): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -424,6 +764,10 @@ class RetrieveParams(RequestOptions): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ + enhanced_eligibility_types: List[Literal["visa_compelling_evidence_3"]] + """ + List of eligibility types that are included in `enhanced_evidence`. + """ evidence: Evidence evidence_details: EvidenceDetails id: str diff --git a/stripe/_dispute_service.py b/stripe/_dispute_service.py index e55049146..97c4f7897 100644 --- a/stripe/_dispute_service.py +++ b/stripe/_dispute_service.py @@ -141,6 +141,12 @@ class UpdateParamsEvidence(TypedDict): """ The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. """ + enhanced_evidence: NotRequired[ + "Literal['']|DisputeService.UpdateParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ product_description: NotRequired[str] """ A description of the product or service that was sold. Has a maximum character count of 20,000. @@ -198,6 +204,166 @@ class UpdateParamsEvidence(TypedDict): Any additional evidence or statements. Has a maximum character count of 20,000. """ + class UpdateParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, + ): + disputed_transaction: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, + ): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[ + Literal["merchandise", "services"] + ] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, + ): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, + ): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State, county, province, or region. + """ + def list( self, params: "DisputeService.ListParams" = {}, diff --git a/stripe/_event.py b/stripe/_event.py index a54c62909..1b9ed4c48 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -276,6 +276,7 @@ class RetrieveParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -319,6 +320,7 @@ class RetrieveParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 3c2bd5886..8d7d66e0a 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -221,6 +221,7 @@ class CustomerTaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -256,6 +257,8 @@ class CustomerTaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -279,16 +282,19 @@ class CustomerTaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -758,10 +764,15 @@ class Filters(StripeObject): "giropay", "grabpay", "ideal", + "jp_credit_transfer", + "kakao_pay", "konbini", + "kr_card", "link", "multibanco", + "naver_pay", "p24", + "payco", "paynow", "paypal", "promptpay", @@ -1238,6 +1249,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -1264,6 +1276,10 @@ class CreateParams(RequestOptions): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -1457,7 +1473,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -2045,7 +2061,7 @@ class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -2082,6 +2098,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -2117,6 +2134,8 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -2140,15 +2159,18 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2984,6 +3006,10 @@ class ModifyParams(RequestOptions): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -3151,7 +3177,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -3891,7 +3917,7 @@ class UpcomingLinesParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -3928,6 +3954,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -3963,6 +3990,8 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -3986,15 +4015,18 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -5026,7 +5058,7 @@ class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -5063,6 +5095,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -5098,6 +5131,8 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -5121,15 +5156,18 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -6124,6 +6162,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -6469,6 +6508,9 @@ class VoidInvoiceParams(RequestOptions): The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. """ total_pretax_credit_amounts: Optional[List[TotalPretaxCreditAmount]] + """ + Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + """ total_tax_amounts: List[TotalTaxAmount] """ The aggregate amounts calculated per tax rate for all line items. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 827490207..f7a943ad8 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -319,6 +319,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -386,6 +387,9 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): The plan of the subscription, if the line item is a subscription or a proration. """ pretax_credit_amounts: Optional[List[PretaxCreditAmount]] + """ + Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + """ price: Optional["Price"] """ The price of the line item. diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 3130ebda8..62dade07b 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -216,6 +216,7 @@ class UpdateParamsTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 016c3c1bb..0e17cf433 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -218,6 +218,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -244,6 +245,10 @@ class CreateParams(TypedDict): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -443,7 +448,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -1037,7 +1042,7 @@ class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -1074,6 +1079,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -1109,6 +1115,8 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -1132,15 +1140,18 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2256,7 +2267,7 @@ class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -2293,6 +2304,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -2328,6 +2340,8 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -2351,15 +2365,18 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3362,6 +3379,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -3388,6 +3406,10 @@ class UpdateParams(TypedDict): """ Settings for automatic tax lookup for this invoice. """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] ] @@ -3559,7 +3581,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 12e58adf8..745aa73b2 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -250,7 +250,7 @@ class ListParamsCustomerDetailsShippingAddress(TypedDict): """ country: NotRequired[str] """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ line1: NotRequired[str] """ @@ -287,6 +287,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -322,6 +323,8 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -345,15 +348,18 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index e93bf7b68..a4bebee61 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -109,6 +109,12 @@ class Card(StripeObject): class Cashapp(StripeObject): pass + class KakaoPay(StripeObject): + pass + + class KrCard(StripeObject): + pass + class Link(StripeObject): pass @@ -147,6 +153,8 @@ class UsBankAccount(StripeObject): bacs_debit: Optional[BacsDebit] card: Optional[Card] cashapp: Optional[Cashapp] + kakao_pay: Optional[KakaoPay] + kr_card: Optional[KrCard] link: Optional[Link] paypal: Optional[Paypal] revolut_pay: Optional[RevolutPay] @@ -163,6 +171,8 @@ class UsBankAccount(StripeObject): "bacs_debit": BacsDebit, "card": Card, "cashapp": Cashapp, + "kakao_pay": KakaoPay, + "kr_card": KrCard, "link": Link, "paypal": Paypal, "revolut_pay": RevolutPay, diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index cbb749a12..fe1b3d96f 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -154,5 +154,6 @@ stripe.v2.billing.MeterEventAdjustment.OBJECT_NAME: stripe.v2.billing.MeterEventAdjustment, stripe.v2.billing.MeterEventSession.OBJECT_NAME: stripe.v2.billing.MeterEventSession, stripe.v2.Event.OBJECT_NAME: stripe.v2.Event, + stripe.v2.EventDestination.OBJECT_NAME: stripe.v2.EventDestination, # V2 Object classes: The end of the section generated from our OpenAPI spec } diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 974f9e729..482373185 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1055,6 +1055,12 @@ class Alipay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Alma(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class AmazonPay(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1484,6 +1490,22 @@ class Ideal(StripeObject): class InteracPresent(StripeObject): pass + class KakaoPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Klarna(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1532,6 +1554,22 @@ class Konbini(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KrCard(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Link(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -1580,6 +1618,12 @@ class Multibanco(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class NaverPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Oxxo(StripeObject): expires_after_days: int """ @@ -1608,6 +1652,12 @@ class P24(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Payco(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Paynow(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -1692,6 +1742,12 @@ class RevolutPay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class SamsungPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class SepaDebit(StripeObject): class MandateOptions(StripeObject): pass @@ -1866,6 +1922,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -1882,18 +1939,23 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] promptpay: Optional[Promptpay] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1906,6 +1968,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -1922,18 +1985,23 @@ class Zip(StripeObject): "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -2028,11 +2096,9 @@ class TransferData(StripeObject): class ApplyCustomerBalanceParams(RequestOptions): amount: NotRequired[int] """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. - - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). + Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - The maximum amount is the amount of the PaymentIntent. + A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. """ @@ -2269,6 +2335,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -2351,6 +2421,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna" ] @@ -2363,6 +2439,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -2383,6 +2465,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -2391,6 +2479,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow" ] @@ -2425,6 +2517,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -2450,6 +2548,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2463,18 +2562,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2526,6 +2630,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2711,12 +2818,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -2742,6 +2852,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -2751,6 +2864,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2789,6 +2908,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2810,6 +2932,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -2881,6 +3006,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" ] @@ -2977,6 +3108,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna" ] @@ -2989,6 +3126,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink" ] @@ -3007,6 +3150,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo" ] @@ -3019,6 +3168,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow" ] @@ -3049,6 +3204,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" ] @@ -3211,6 +3372,16 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3783,6 +3954,28 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3888,6 +4081,28 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -3952,6 +4167,16 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -3988,6 +4213,16 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -4116,6 +4351,16 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -4630,6 +4875,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAmazonPay" ] @@ -4712,6 +4961,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarna" ] @@ -4724,6 +4979,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -4744,6 +5005,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -4752,6 +5019,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPaynow" ] @@ -4786,6 +5057,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit" ] @@ -4811,6 +5088,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -4824,18 +5102,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -4887,6 +5170,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -5072,12 +5358,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob" @@ -5103,6 +5392,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -5112,6 +5404,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -5150,6 +5448,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -5171,6 +5472,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -5242,6 +5546,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAmazonPay" ] @@ -5338,6 +5648,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna" ] @@ -5350,6 +5666,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink" ] @@ -5368,6 +5690,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo" ] @@ -5380,6 +5708,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow" ] @@ -5410,6 +5744,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -5572,6 +5912,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6144,6 +6494,28 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6249,6 +6621,28 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6313,6 +6707,16 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -6349,6 +6753,16 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -6477,6 +6891,16 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -6985,6 +7409,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAmazonPay" ] @@ -7067,6 +7495,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarna" ] @@ -7079,6 +7513,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -7099,6 +7539,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -7107,6 +7553,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPaynow" ] @@ -7141,6 +7591,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit" ] @@ -7166,6 +7622,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -7179,18 +7636,23 @@ class ModifyParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -7242,6 +7704,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAlma(TypedDict): + pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -7427,12 +7892,15 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob" @@ -7458,6 +7926,9 @@ class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): class ModifyParamsPaymentMethodDataKonbini(TypedDict): pass + class ModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + class ModifyParamsPaymentMethodDataLink(TypedDict): pass @@ -7467,6 +7938,12 @@ class ModifyParamsPaymentMethodDataMobilepay(TypedDict): class ModifyParamsPaymentMethodDataMultibanco(TypedDict): pass + class ModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -7505,6 +7982,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayco(TypedDict): + pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): pass @@ -7526,6 +8006,9 @@ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -7597,6 +8080,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAmazonPay" ] @@ -7693,6 +8182,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna" ] @@ -7705,6 +8200,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink" ] @@ -7723,6 +8224,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo" ] @@ -7735,6 +8242,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow" ] @@ -7765,6 +8278,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit" ] @@ -7927,6 +8446,16 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8499,6 +9028,28 @@ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8604,6 +9155,28 @@ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ModifyParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8668,6 +9241,16 @@ class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -8704,6 +9287,16 @@ class ModifyParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ModifyParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -8832,6 +9425,16 @@ class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ModifyParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 9be12ae19..8fa22ca1b 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -14,11 +14,9 @@ class PaymentIntentService(StripeService): class ApplyCustomerBalanceParams(TypedDict): amount: NotRequired[int] """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. + Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). - - The maximum amount is the amount of the PaymentIntent. + A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. """ @@ -259,6 +257,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -349,6 +353,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarna" ] @@ -361,6 +371,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataLink" ] @@ -383,6 +399,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataOxxo" ] @@ -395,6 +417,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataPaynow" ] @@ -431,6 +459,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -460,6 +494,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -473,18 +508,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -538,6 +578,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -723,12 +766,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -754,6 +800,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -763,6 +812,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -801,6 +856,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -822,6 +880,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -893,6 +954,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" ] @@ -989,6 +1056,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarna" ] @@ -1001,6 +1074,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsLink" ] @@ -1019,6 +1098,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsOxxo" ] @@ -1031,6 +1116,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaynow" ] @@ -1061,6 +1152,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebit" ] @@ -1223,6 +1320,16 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1795,6 +1902,28 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1900,6 +2029,28 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -1964,6 +2115,16 @@ class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -2000,6 +2161,16 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -2128,6 +2299,16 @@ class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -2646,6 +2827,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -2736,6 +2923,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataKlarna" ] @@ -2748,6 +2941,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataLink" ] @@ -2770,6 +2969,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataOxxo" ] @@ -2782,6 +2987,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataPaynow" ] @@ -2818,6 +3029,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -2847,6 +3064,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2860,18 +3078,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2925,6 +3148,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -3110,12 +3336,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataKlarnaDob" @@ -3141,6 +3370,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -3150,6 +3382,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -3188,6 +3426,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3209,6 +3450,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -3280,6 +3524,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAmazonPay" ] @@ -3376,6 +3626,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKlarna" ] @@ -3388,6 +3644,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsLink" ] @@ -3406,6 +3668,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsOxxo" ] @@ -3418,6 +3686,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPaynow" ] @@ -3448,6 +3722,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -3610,6 +3890,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4182,6 +4472,28 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4287,6 +4599,28 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -4351,6 +4685,16 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -4387,6 +4731,16 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -4515,6 +4869,16 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" @@ -5055,6 +5419,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataAmazonPay" ] @@ -5145,6 +5515,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataKlarna" ] @@ -5157,6 +5533,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataLink" ] @@ -5179,6 +5561,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataOxxo" ] @@ -5191,6 +5579,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataPaynow" ] @@ -5227,6 +5621,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataSepaDebit" ] @@ -5256,6 +5656,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -5269,18 +5670,23 @@ class UpdateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -5334,6 +5740,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAlma(TypedDict): + pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -5519,12 +5928,15 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataKlarnaDob" @@ -5550,6 +5962,9 @@ class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): class UpdateParamsPaymentMethodDataKonbini(TypedDict): pass + class UpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + class UpdateParamsPaymentMethodDataLink(TypedDict): pass @@ -5559,6 +5974,12 @@ class UpdateParamsPaymentMethodDataMobilepay(TypedDict): class UpdateParamsPaymentMethodDataMultibanco(TypedDict): pass + class UpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -5597,6 +6018,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayco(TypedDict): + pass + class UpdateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -5618,6 +6042,9 @@ class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -5689,6 +6116,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + alma: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ amazon_pay: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" ] @@ -5785,6 +6218,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarna" ] @@ -5797,6 +6236,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsLink" ] @@ -5815,6 +6260,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsOxxo" ] @@ -5827,6 +6278,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. """ + payco: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPaynow" ] @@ -5857,6 +6314,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebit" ] @@ -6019,6 +6482,16 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6591,6 +7064,28 @@ class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6696,6 +7191,28 @@ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class UpdateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -6760,6 +7277,16 @@ class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -6796,6 +7323,16 @@ class UpdateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class UpdateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class UpdateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -6924,6 +7461,16 @@ class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class UpdateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + 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. + """ + class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 9f22c9806..200e09f7e 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -775,6 +775,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", @@ -1678,7 +1679,7 @@ class ModifyParams(RequestOptions): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -2430,6 +2431,7 @@ class RetrieveParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 3ff76553a..0121889d8 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -116,6 +116,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "au_becs_debit", "bacs_debit", "bancontact", @@ -1021,7 +1022,7 @@ class UpdateParams(TypedDict): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 992ccf063..bcbc2a95c 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -69,6 +69,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -981,6 +984,9 @@ class Networks(StripeObject): """ _inner_class_types = {"networks": Networks} + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): class Dob(StripeObject): day: Optional[int] @@ -1005,6 +1011,41 @@ class Dob(StripeObject): class Konbini(StripeObject): pass + class KrCard(StripeObject): + brand: Optional[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ] + ] + """ + The local credit or debit card brand. + """ + last4: Optional[str] + """ + The last four digits of the card. This may not be present for American Express cards. + """ + class Link(StripeObject): email: Optional[str] """ @@ -1021,6 +1062,12 @@ class Mobilepay(StripeObject): class Multibanco(StripeObject): pass + class NaverPay(StripeObject): + funding: Literal["card", "points"] + """ + Whether to fund this transaction with Naver Pay points or a card. + """ + class Oxxo(StripeObject): pass @@ -1059,6 +1106,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class Payco(StripeObject): + pass + class Paynow(StripeObject): pass @@ -1088,6 +1138,9 @@ class RadarOptions(StripeObject): class RevolutPay(StripeObject): pass + class SamsungPay(StripeObject): + pass + class SepaDebit(StripeObject): class GeneratedFrom(StripeObject): charge: Optional[ExpandableField["Charge"]] @@ -1268,6 +1321,10 @@ class CreateParams(RequestOptions): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentMethod.CreateParamsAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired["PaymentMethod.CreateParamsAmazonPay"] """ If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. @@ -1346,6 +1403,10 @@ class CreateParams(RequestOptions): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired["PaymentMethod.CreateParamsKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["PaymentMethod.CreateParamsKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -1354,6 +1415,10 @@ class CreateParams(RequestOptions): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["PaymentMethod.CreateParamsKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentMethod.CreateParamsLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -1370,6 +1435,10 @@ class CreateParams(RequestOptions): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired["PaymentMethod.CreateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentMethod.CreateParamsOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -1378,6 +1447,10 @@ class CreateParams(RequestOptions): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentMethod.CreateParamsPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ payment_method: NotRequired[str] """ The PaymentMethod to share. @@ -1406,6 +1479,10 @@ class CreateParams(RequestOptions): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired["PaymentMethod.CreateParamsSamsungPay"] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit"] """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -1428,6 +1505,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1442,18 +1520,23 @@ class CreateParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1502,6 +1585,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAlma(TypedDict): + pass + class CreateParamsAmazonPay(TypedDict): pass @@ -1721,12 +1807,15 @@ class CreateParamsIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsInteracPresent(TypedDict): pass + class CreateParamsKakaoPay(TypedDict): + pass + class CreateParamsKlarna(TypedDict): dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob"] """ @@ -1750,6 +1839,9 @@ class CreateParamsKlarnaDob(TypedDict): class CreateParamsKonbini(TypedDict): pass + class CreateParamsKrCard(TypedDict): + pass + class CreateParamsLink(TypedDict): pass @@ -1759,6 +1851,12 @@ class CreateParamsMobilepay(TypedDict): class CreateParamsMultibanco(TypedDict): pass + class CreateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsOxxo(TypedDict): pass @@ -1797,6 +1895,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayco(TypedDict): + pass + class CreateParamsPaynow(TypedDict): pass @@ -1818,6 +1919,9 @@ class CreateParamsRadarOptions(TypedDict): class CreateParamsRevolutPay(TypedDict): pass + class CreateParamsSamsungPay(TypedDict): + pass + class CreateParamsSepaDebit(TypedDict): iban: str """ @@ -1897,6 +2001,7 @@ class ListParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1911,18 +2016,23 @@ class ListParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1965,6 +2075,10 @@ class ModifyParams(RequestOptions): """ Set of [key-value pairs](https://stripe.com/docs/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`. """ + naver_pay: NotRequired["PaymentMethod.ModifyParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ us_bank_account: NotRequired["PaymentMethod.ModifyParamsUsBankAccount"] """ If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. @@ -2041,6 +2155,12 @@ class ModifyParamsCardNetworks(TypedDict): class ModifyParamsLink(TypedDict): pass + class ModifyParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ @@ -2065,6 +2185,7 @@ class RetrieveParams(RequestOptions): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] @@ -2094,8 +2215,10 @@ class RetrieveParams(RequestOptions): """ ideal: Optional[Ideal] interac_present: Optional[InteracPresent] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] livemode: bool """ @@ -2107,12 +2230,14 @@ class RetrieveParams(RequestOptions): """ mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] object: Literal["payment_method"] """ String representing the object's type. Objects of the same type share the same value. """ oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] @@ -2122,6 +2247,7 @@ class RetrieveParams(RequestOptions): Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. """ revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -2131,6 +2257,7 @@ class RetrieveParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2147,18 +2274,23 @@ class RetrieveParams(RequestOptions): "grabpay", "ideal", "interac_present", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2635,6 +2767,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, @@ -2652,19 +2785,24 @@ async def retrieve_async( "grabpay": Grabpay, "ideal": Ideal, "interac_present": InteracPresent, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "promptpay": Promptpay, "radar_options": RadarOptions, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 033ac855a..4630c094e 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -125,6 +125,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Alma(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class AmazonPay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -938,6 +960,10 @@ class CreateParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfiguration.CreateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfiguration.CreateParamsAmazonPay" ] @@ -1118,7 +1144,7 @@ class CreateParams(RequestOptions): "PaymentMethodConfiguration.CreateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfiguration.CreateParamsWechatPay" @@ -1187,6 +1213,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAmazonPayDisplayPreference" @@ -1752,6 +1792,10 @@ class ModifyParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfiguration.ModifyParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAmazonPay" ] @@ -1928,7 +1972,7 @@ class ModifyParams(RequestOptions): "PaymentMethodConfiguration.ModifyParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfiguration.ModifyParamsWechatPay" @@ -1997,6 +2041,20 @@ class ModifyParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class ModifyParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class ModifyParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class ModifyParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAmazonPayDisplayPreference" @@ -2529,6 +2587,7 @@ class RetrieveParams(RequestOptions): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] apple_pay: Optional[ApplePay] application: Optional[str] @@ -2735,6 +2794,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "apple_pay": ApplePay, "au_becs_debit": AuBecsDebit, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index d43649ab1..e0138a5ef 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -35,6 +35,10 @@ class CreateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfigurationService.CreateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfigurationService.CreateParamsAmazonPay" ] @@ -239,7 +243,7 @@ class CreateParams(TypedDict): "PaymentMethodConfigurationService.CreateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfigurationService.CreateParamsWechatPay" @@ -308,6 +312,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsAmazonPayDisplayPreference" @@ -883,6 +901,10 @@ class UpdateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + alma: NotRequired["PaymentMethodConfigurationService.UpdateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ amazon_pay: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsAmazonPay" ] @@ -1083,7 +1105,7 @@ class UpdateParams(TypedDict): "PaymentMethodConfigurationService.UpdateParamsUsBankAccount" ] """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. """ wechat_pay: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsWechatPay" @@ -1152,6 +1174,20 @@ class UpdateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class UpdateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class UpdateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class UpdateParamsAmazonPay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsAmazonPayDisplayPreference" diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index 533bdf5ba..3fb016792 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -27,6 +27,23 @@ class PaymentMethodDomain( "payment_method_domain" ) + class AmazonPay(StripeObject): + class StatusDetails(StripeObject): + error_message: str + """ + The error message associated with the status of the payment method on the domain. + """ + + status: Literal["active", "inactive"] + """ + The status of the payment method on the domain. + """ + status_details: Optional[StatusDetails] + """ + Contains additional details about the status of a payment method for a specific payment method domain. + """ + _inner_class_types = {"status_details": StatusDetails} + class ApplePay(StripeObject): class StatusDetails(StripeObject): error_message: str @@ -157,6 +174,10 @@ class ValidateParams(RequestOptions): Specifies which fields in the response should be expanded. """ + amazon_pay: AmazonPay + """ + Indicates the status of a specific payment method on a payment method domain. + """ apple_pay: ApplePay """ Indicates the status of a specific payment method on a payment method domain. @@ -483,6 +504,7 @@ async def validate_async( # pyright: ignore[reportGeneralTypeIssues] ) _inner_class_types = { + "amazon_pay": AmazonPay, "apple_pay": ApplePay, "google_pay": GooglePay, "link": Link, diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 45c33c23e..741d1437b 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -45,6 +45,10 @@ class CreateParams(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["PaymentMethodService.CreateParamsAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired["PaymentMethodService.CreateParamsAmazonPay"] """ If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. @@ -125,6 +129,10 @@ class CreateParams(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired["PaymentMethodService.CreateParamsKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["PaymentMethodService.CreateParamsKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -133,6 +141,10 @@ class CreateParams(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["PaymentMethodService.CreateParamsKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["PaymentMethodService.CreateParamsLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -149,6 +161,10 @@ class CreateParams(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired["PaymentMethodService.CreateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["PaymentMethodService.CreateParamsOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -157,6 +173,10 @@ class CreateParams(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["PaymentMethodService.CreateParamsPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ payment_method: NotRequired[str] """ The PaymentMethod to share. @@ -187,6 +207,10 @@ class CreateParams(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired["PaymentMethodService.CreateParamsSamsungPay"] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired["PaymentMethodService.CreateParamsSepaDebit"] """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -209,6 +233,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -223,18 +248,23 @@ class CreateParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -285,6 +315,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAlma(TypedDict): + pass + class CreateParamsAmazonPay(TypedDict): pass @@ -504,12 +537,15 @@ class CreateParamsIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsInteracPresent(TypedDict): pass + class CreateParamsKakaoPay(TypedDict): + pass + class CreateParamsKlarna(TypedDict): dob: NotRequired["PaymentMethodService.CreateParamsKlarnaDob"] """ @@ -533,6 +569,9 @@ class CreateParamsKlarnaDob(TypedDict): class CreateParamsKonbini(TypedDict): pass + class CreateParamsKrCard(TypedDict): + pass + class CreateParamsLink(TypedDict): pass @@ -542,6 +581,12 @@ class CreateParamsMobilepay(TypedDict): class CreateParamsMultibanco(TypedDict): pass + class CreateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsOxxo(TypedDict): pass @@ -580,6 +625,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayco(TypedDict): + pass + class CreateParamsPaynow(TypedDict): pass @@ -601,6 +649,9 @@ class CreateParamsRadarOptions(TypedDict): class CreateParamsRevolutPay(TypedDict): pass + class CreateParamsSamsungPay(TypedDict): + pass + class CreateParamsSepaDebit(TypedDict): iban: str """ @@ -680,6 +731,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -694,18 +746,23 @@ class ListParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -754,6 +811,10 @@ class UpdateParams(TypedDict): """ Set of [key-value pairs](https://stripe.com/docs/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`. """ + naver_pay: NotRequired["PaymentMethodService.UpdateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ us_bank_account: NotRequired[ "PaymentMethodService.UpdateParamsUsBankAccount" ] @@ -832,6 +893,12 @@ class UpdateParamsCardNetworks(TypedDict): class UpdateParamsLink(TypedDict): pass + class UpdateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ diff --git a/stripe/_person.py b/stripe/_person.py index 7082f215b..315874c14 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -588,7 +588,7 @@ class Document(StripeObject): """ gender: Optional[str] """ - The person's gender (International regulations require either "male" or "female"). + The person's gender. """ id: str """ diff --git a/stripe/_refund.py b/stripe/_refund.py index 6dae4382a..7a79cbe89 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -51,6 +51,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class Alma(StripeObject): + pass + class AmazonPay(StripeObject): pass @@ -227,6 +230,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + alma: Optional[Alma] amazon_pay: Optional[AmazonPay] au_bank_transfer: Optional[AuBankTransfer] blik: Optional[Blik] @@ -262,6 +266,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "alma": Alma, "amazon_pay": AmazonPay, "au_bank_transfer": AuBankTransfer, "blik": Blik, @@ -311,9 +316,6 @@ class EmailSent(StripeObject): _inner_class_types = {"email_sent": EmailSent} display_details: Optional[DisplayDetails] - """ - Contains the refund details. - """ type: str """ Type of the next action to perform. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index d9d8d570b..f5c5943e9 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -329,9 +329,15 @@ class Ideal(StripeObject): (if supported) at the time of authorization or settlement. They cannot be set or mutated. """ + class KakaoPay(StripeObject): + pass + class Klarna(StripeObject): pass + class KrCard(StripeObject): + pass + class Link(StripeObject): pass @@ -393,7 +399,9 @@ class UsBankAccount(StripeObject): card_present: Optional[CardPresent] cashapp: Optional[Cashapp] ideal: Optional[Ideal] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] + kr_card: Optional[KrCard] link: Optional[Link] paypal: Optional[Paypal] revolut_pay: Optional[RevolutPay] @@ -415,7 +423,9 @@ class UsBankAccount(StripeObject): "card_present": CardPresent, "cashapp": Cashapp, "ideal": Ideal, + "kakao_pay": KakaoPay, "klarna": Klarna, + "kr_card": KrCard, "link": Link, "paypal": Paypal, "revolut_pay": RevolutPay, diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index ed2da02a6..e55a0d367 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -765,6 +765,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -845,6 +849,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -855,6 +865,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -875,6 +891,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -883,6 +905,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -913,6 +939,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -936,6 +968,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -949,18 +982,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1012,6 +1050,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1197,12 +1238,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob"] """ @@ -1226,6 +1270,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -1235,6 +1282,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1273,6 +1326,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -1294,6 +1350,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -1901,6 +1960,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1981,6 +2044,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -1991,6 +2060,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.CreateParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -2011,6 +2084,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.CreateParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -2019,6 +2098,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -2049,6 +2132,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataSepaDebit" ] @@ -2072,6 +2161,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2085,18 +2175,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2148,6 +2243,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2333,12 +2431,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarnaDob"] """ @@ -2362,6 +2463,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -2371,6 +2475,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2409,6 +2519,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -2430,6 +2543,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -3004,6 +3120,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAmazonPay" ] @@ -3084,6 +3204,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarna"] """ If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. @@ -3094,6 +3220,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataLink"] """ If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. @@ -3114,6 +3244,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataOxxo"] """ If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. @@ -3122,6 +3258,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaynow"] """ If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. @@ -3152,6 +3292,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit" ] @@ -3175,6 +3321,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -3188,18 +3335,23 @@ class ModifyParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -3251,6 +3403,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAlma(TypedDict): + pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -3436,12 +3591,15 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob"] """ @@ -3465,6 +3623,9 @@ class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): class ModifyParamsPaymentMethodDataKonbini(TypedDict): pass + class ModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + class ModifyParamsPaymentMethodDataLink(TypedDict): pass @@ -3474,6 +3635,12 @@ class ModifyParamsPaymentMethodDataMobilepay(TypedDict): class ModifyParamsPaymentMethodDataMultibanco(TypedDict): pass + class ModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -3512,6 +3679,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayco(TypedDict): + pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3533,6 +3703,9 @@ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index d65aaa4b6..73cfb2e9e 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -138,6 +138,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataAmazonPay" ] @@ -228,6 +234,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataKlarna" ] @@ -240,6 +252,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataLink" ] @@ -262,6 +280,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataOxxo" ] @@ -274,6 +298,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataPaynow" ] @@ -310,6 +340,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataSepaDebit" ] @@ -339,6 +375,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -352,18 +389,23 @@ class ConfirmParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -417,6 +459,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -602,12 +647,15 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass + class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" @@ -633,6 +681,9 @@ class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): class ConfirmParamsPaymentMethodDataKonbini(TypedDict): pass + class ConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + class ConfirmParamsPaymentMethodDataLink(TypedDict): pass @@ -642,6 +693,12 @@ class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): pass + class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -680,6 +737,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): pass @@ -701,6 +761,9 @@ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): pass + class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -1316,6 +1379,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -1402,6 +1471,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataKlarna" ] @@ -1414,6 +1489,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataLink" ] @@ -1436,6 +1517,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataOxxo" ] @@ -1446,6 +1533,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataPaynow" ] @@ -1480,6 +1573,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -1509,6 +1608,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1522,18 +1622,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1585,6 +1690,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -1770,12 +1878,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataKlarnaDob" @@ -1801,6 +1912,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -1810,6 +1924,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1848,6 +1968,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -1869,6 +1992,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ @@ -2461,6 +2587,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataAmazonPay" ] @@ -2547,6 +2679,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataKlarna" ] @@ -2559,6 +2697,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataLink" ] @@ -2581,6 +2725,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataOxxo" ] @@ -2591,6 +2741,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataPaynow" ] @@ -2625,6 +2781,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataSepaDebit" ] @@ -2654,6 +2816,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -2667,18 +2830,23 @@ class UpdateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2730,6 +2898,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAlma(TypedDict): + pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -2915,12 +3086,15 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataKlarnaDob" @@ -2946,6 +3120,9 @@ class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): class UpdateParamsPaymentMethodDataKonbini(TypedDict): pass + class UpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + class UpdateParamsPaymentMethodDataLink(TypedDict): pass @@ -2955,6 +3132,12 @@ class UpdateParamsPaymentMethodDataMobilepay(TypedDict): class UpdateParamsPaymentMethodDataMultibanco(TypedDict): pass + class UpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class UpdateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2993,6 +3176,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayco(TypedDict): + pass + class UpdateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -3014,6 +3200,9 @@ class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 93c9edeb6..681c609b3 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -372,10 +372,15 @@ class Filters(StripeObject): "giropay", "grabpay", "ideal", + "jp_credit_transfer", + "kakao_pay", "konbini", + "kr_card", "link", "multibanco", + "naver_pay", "p24", + "payco", "paynow", "paypal", "promptpay", @@ -470,7 +475,7 @@ class CancelParams(RequestOptions): """ invoice_now: NotRequired[bool] """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. """ prorate: NotRequired[bool] """ @@ -922,7 +927,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -1758,7 +1763,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -2020,7 +2025,7 @@ class ModifyParamsTrialSettingsEndBehavior(TypedDict): class ResumeParams(RequestOptions): billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). """ expand: NotRequired[List[str]] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index adad3f820..b3160ca51 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -25,7 +25,7 @@ class CancelParams(TypedDict): """ invoice_now: NotRequired[bool] """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. """ prorate: NotRequired[bool] """ @@ -487,7 +487,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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). @@ -893,7 +893,7 @@ class ListParamsCurrentPeriodStart(TypedDict): class ResumeParams(TypedDict): billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). Setting the value to `unchanged` advances the subscription's billing cycle anchor to the period that surrounds the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). """ expand: NotRequired[List[str]] """ @@ -1379,7 +1379,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', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', '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', 'jp_credit_transfer', 'kakao_pay', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'p24', 'payco', '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/_tax_id.py b/stripe/_tax_id.py index 3c6ab718e..3cf29c0b2 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -89,6 +89,7 @@ class CreateParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -124,6 +125,8 @@ class CreateParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -147,15 +150,18 @@ class CreateParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -260,6 +266,7 @@ class RetrieveParams(RequestOptions): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -295,6 +302,8 @@ class RetrieveParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -318,16 +327,19 @@ class RetrieveParams(RequestOptions): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 87e07bc5b..1f6cf5c58 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -30,6 +30,7 @@ class CreateParams(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -65,6 +66,8 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -88,15 +91,18 @@ class CreateParams(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 8a19bb5d5..fa5efcfe8 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -4,6 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id from typing import ClassVar, Dict, List, Optional, cast @@ -23,6 +24,16 @@ class TaxRate( OBJECT_NAME: ClassVar[Literal["tax_rate"]] = "tax_rate" + class FlatAmount(StripeObject): + amount: int + """ + Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + currency: str + """ + Three-letter ISO currency code, in lowercase. + """ + class CreateParams(RequestOptions): active: NotRequired[bool] """ @@ -75,6 +86,7 @@ class CreateParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -176,6 +188,7 @@ class ModifyParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -217,6 +230,10 @@ class RetrieveParams(RequestOptions): this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction. """ + flat_amount: Optional[FlatAmount] + """ + The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + """ id: str """ Unique identifier for the object. @@ -251,6 +268,10 @@ class RetrieveParams(RequestOptions): """ Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. """ + rate_type: Optional[Literal["flat_amount", "percentage"]] + """ + Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + """ state: Optional[str] """ [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. @@ -266,6 +287,7 @@ class RetrieveParams(RequestOptions): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -400,3 +422,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"flat_amount": FlatAmount} diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index 61399dec6..b8de81f3b 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -62,6 +62,7 @@ class CreateParams(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -169,6 +170,7 @@ class UpdateParams(TypedDict): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/_token.py b/stripe/_token.py index 11558266a..03ef8faa1 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -349,7 +349,7 @@ class CreateParamsAccountIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1115,7 +1115,7 @@ class RetrieveParams(RequestOptions): def create(cls, **params: Unpack["Token.CreateParams"]) -> "Token": """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( "Token", @@ -1132,7 +1132,7 @@ async def create_async( ) -> "Token": """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( "Token", diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 9fe918393..30be56d21 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -320,7 +320,7 @@ class CreateParamsAccountIndividual(TypedDict): """ gender: NotRequired[str] """ - The individual's gender (International regulations require either "male" or "female"). + The individual's gender """ id_number: NotRequired[str] """ @@ -1092,7 +1092,7 @@ def create( ) -> Token: """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( Token, @@ -1112,7 +1112,7 @@ async def create_async( ) -> Token: """ Creates a single-use token that represents a bank account's details. - You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. """ return cast( Token, diff --git a/stripe/_usage_record_summary.py b/stripe/_usage_record_summary.py index fa46e82e3..2276bf95e 100644 --- a/stripe/_usage_record_summary.py +++ b/stripe/_usage_record_summary.py @@ -6,6 +6,10 @@ class UsageRecordSummary(StripeObject): + """ + A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. + """ + OBJECT_NAME: ClassVar[Literal["usage_record_summary"]] = ( "usage_record_summary" ) diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index bd4140848..d6200f448 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -135,6 +135,7 @@ class CreateParams(RequestOptions): "2024-04-10", "2024-06-20", "2024-09-30.acacia", + "2024-10-28.acacia", ] ] """ @@ -271,6 +272,7 @@ class CreateParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -314,6 +316,7 @@ class CreateParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", @@ -560,6 +563,7 @@ class ModifyParams(RequestOptions): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -603,6 +607,7 @@ class ModifyParams(RequestOptions): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index c29a6db8c..30bd28342 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -116,6 +116,7 @@ class CreateParams(TypedDict): "2024-04-10", "2024-06-20", "2024-09-30.acacia", + "2024-10-28.acacia", ] ] """ @@ -252,6 +253,7 @@ class CreateParams(TypedDict): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -295,6 +297,7 @@ class CreateParams(TypedDict): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", @@ -547,6 +550,7 @@ class UpdateParams(TypedDict): "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", @@ -590,6 +594,7 @@ class UpdateParams(TypedDict): "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", + "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index d91252dbf..03e1a5de3 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -19,7 +19,7 @@ class CreditBalanceSummary(SingletonAPIResource["CreditBalanceSummary"]): """ - Indicates the credit balance for credits granted to a customer. + Indicates the billing credit balance for billing credits granted to a customer. """ OBJECT_NAME: ClassVar[Literal["billing.credit_balance_summary"]] = ( @@ -44,7 +44,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -65,7 +65,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -95,11 +95,11 @@ class RetrieveParamsFilter(TypedDict): "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScope" ] """ - The credit applicability scope for which to fetch balance summary. + The billing credit applicability scope for which to fetch credit balance summary. """ credit_grant: NotRequired[str] """ - The credit grant for which to fetch balance summary. + The credit grant for which to fetch credit balance summary. """ type: Literal["applicability_scope", "credit_grant"] """ @@ -114,7 +114,7 @@ class RetrieveParamsFilterApplicabilityScope(TypedDict): balances: List[Balance] """ - The credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. """ customer: ExpandableField["Customer"] """ diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py index 045e093b0..096de2915 100644 --- a/stripe/billing/_credit_balance_summary_service.py +++ b/stripe/billing/_credit_balance_summary_service.py @@ -27,11 +27,11 @@ class RetrieveParamsFilter(TypedDict): "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScope" ] """ - The credit applicability scope for which to fetch balance summary. + The billing credit applicability scope for which to fetch credit balance summary. """ credit_grant: NotRequired[str] """ - The credit grant for which to fetch balance summary. + The credit grant for which to fetch credit balance summary. """ type: Literal["applicability_scope", "credit_grant"] """ diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py index ff8de6bad..712bd7f14 100644 --- a/stripe/billing/_credit_balance_transaction.py +++ b/stripe/billing/_credit_balance_transaction.py @@ -43,7 +43,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -72,24 +72,24 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} class CreditsApplied(StripeObject): invoice: ExpandableField["Invoice"] """ - The invoice to which the credits were applied. + The invoice to which the billing credits were applied. """ invoice_line_item: str """ - The invoice line item to which the credits were applied. + The invoice line item to which the billing credits were applied. """ amount: Amount credits_applied: Optional[CreditsApplied] """ - Details of how the credits were applied to an invoice. Only present if `type` is `credits_applied`. + Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. """ type: Literal["credits_applied", "credits_expired", "credits_voided"] """ @@ -138,19 +138,19 @@ class RetrieveParams(RequestOptions): """ credit: Optional[Credit] """ - Credit details for this balance transaction. Only present if type is `credit`. + Credit details for this credit balance transaction. Only present if type is `credit`. """ credit_grant: ExpandableField["CreditGrant"] """ - The credit grant associated with this balance transaction. + The credit grant associated with this credit balance transaction. """ debit: Optional[Debit] """ - Debit details for this balance transaction. Only present if type is `debit`. + Debit details for this credit balance transaction. Only present if type is `debit`. """ effective_at: int """ - The effective time of this balance transaction. + The effective time of this credit balance transaction. """ id: str """ @@ -170,7 +170,7 @@ class RetrieveParams(RequestOptions): """ type: Optional[Literal["credit", "debit"]] """ - The type of balance transaction (credit or debit). + The type of credit balance transaction (credit or debit). """ @classmethod diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 51858796d..29a9b52e7 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -28,7 +28,10 @@ class CreditGrant( UpdateableAPIResource["CreditGrant"], ): """ - A credit grant is a resource that records a grant of some credit to a customer. + A credit grant is an API resource that documents the allocation of some billing credits to a customer. + + Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + end """ OBJECT_NAME: ClassVar[Literal["billing.credit_grant"]] = ( @@ -52,7 +55,7 @@ class Monetary(StripeObject): """ type: Literal["monetary"] """ - The type of this amount. We currently only support `monetary` credits. + The type of this amount. We currently only support `monetary` billing credits. """ _inner_class_types = {"monetary": Monetary} @@ -60,7 +63,7 @@ class ApplicabilityConfig(StripeObject): class Scope(StripeObject): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ scope: Scope @@ -81,11 +84,11 @@ class CreateParams(RequestOptions): """ customer: str """ - Id of the customer to whom the credit should be granted. + ID of the customer to whom the billing credits should be granted. """ effective_at: NotRequired[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -93,7 +96,7 @@ class CreateParams(RequestOptions): """ expires_at: NotRequired[int] """ - The time when the credit will expire. If not specified, the credit will never expire. + The time when the billing credits will expire. If not specified, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -101,7 +104,7 @@ class CreateParams(RequestOptions): """ name: NotRequired[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ class CreateParamsAmount(TypedDict): @@ -111,7 +114,7 @@ class CreateParamsAmount(TypedDict): """ type: Literal["monetary"] """ - Specify the type of this amount. We currently only support `monetary` credits. + Specify the type of this amount. We currently only support `monetary` billing credits. """ class CreateParamsAmountMonetary(TypedDict): @@ -171,7 +174,7 @@ class ModifyParams(RequestOptions): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -194,7 +197,7 @@ class VoidGrantParams(RequestOptions): applicability_config: ApplicabilityConfig category: Literal["paid", "promotional"] """ - The category of this credit grant. + The category of this credit grant. This is for tracking purposes and will not be displayed to the customer. """ created: int """ @@ -202,15 +205,15 @@ class VoidGrantParams(RequestOptions): """ customer: ExpandableField["Customer"] """ - Id of the customer to whom the credit was granted. + ID of the customer to whom the billing credits are granted. """ effective_at: Optional[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. + The time when the billing credits become effective i.e when they are eligible to be used. """ expires_at: Optional[int] """ - The time when the credit will expire. If not present, the credit will never expire. + The time when the billing credits will expire. If not present, the billing credits will never expire. """ id: str """ @@ -226,7 +229,7 @@ class VoidGrantParams(RequestOptions): """ name: Optional[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ object: Literal["billing.credit_grant"] """ diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index 011a189fb..904df9c2b 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -27,11 +27,11 @@ class CreateParams(TypedDict): """ customer: str """ - Id of the customer to whom the credit should be granted. + ID of the customer to whom the billing credits should be granted. """ effective_at: NotRequired[int] """ - The time when the credit becomes effective i.e when it is eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -39,7 +39,7 @@ class CreateParams(TypedDict): """ expires_at: NotRequired[int] """ - The time when the credit will expire. If not specified, the credit will never expire. + The time when the billing credits will expire. If not specified, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ @@ -47,7 +47,7 @@ class CreateParams(TypedDict): """ name: NotRequired[str] """ - A descriptive name shown in dashboard and on invoices. + A descriptive name shown in dashboard. """ class CreateParamsAmount(TypedDict): @@ -57,7 +57,7 @@ class CreateParamsAmount(TypedDict): """ type: Literal["monetary"] """ - Specify the type of this amount. We currently only support `monetary` credits. + Specify the type of this amount. We currently only support `monetary` billing credits. """ class CreateParamsAmountMonetary(TypedDict): @@ -123,7 +123,7 @@ class UpdateParams(TypedDict): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the credit created by this credit grant will expire. If set to empty, the credit will never expire. + The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. """ metadata: NotRequired[Dict[str, str]] """ diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index e857a9950..bf7e3ec16 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -29,6 +29,8 @@ class Meter( ): """ A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + + Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) """ OBJECT_NAME: ClassVar[Literal["billing.meter"]] = "billing.meter" diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 41dd41f34..f42349e68 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -125,6 +125,21 @@ class Product(StripeObject): The product ID. """ + class ScheduleAtPeriodEnd(StripeObject): + class Condition(StripeObject): + type: Literal[ + "decreasing_item_amount", "shortening_interval" + ] + """ + The type of condition. + """ + + conditions: List[Condition] + """ + List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + """ + _inner_class_types = {"conditions": Condition} + default_allowed_updates: List[ Literal["price", "promotion_code", "quantity"] ] @@ -145,7 +160,11 @@ class Product(StripeObject): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. """ - _inner_class_types = {"products": Product} + schedule_at_period_end: Optional[ScheduleAtPeriodEnd] + _inner_class_types = { + "products": Product, + "schedule_at_period_end": ScheduleAtPeriodEnd, + } customer_update: CustomerUpdate invoice_history: InvoiceHistory @@ -173,7 +192,9 @@ class LoginPage(StripeObject): """ class CreateParams(RequestOptions): - business_profile: "Configuration.CreateParamsBusinessProfile" + business_profile: NotRequired[ + "Configuration.CreateParamsBusinessProfile" + ] """ The business information shown to customers in the portal. """ @@ -337,6 +358,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -348,6 +375,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -539,6 +584,12 @@ class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -550,6 +601,22 @@ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class ModifyParamsLoginPage(TypedDict): enabled: bool """ diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 9edf1db04..ae3a1e47c 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -11,7 +11,9 @@ class ConfigurationService(StripeService): class CreateParams(TypedDict): - business_profile: "ConfigurationService.CreateParamsBusinessProfile" + business_profile: NotRequired[ + "ConfigurationService.CreateParamsBusinessProfile" + ] """ The business information shown to customers in the portal. """ @@ -175,6 +177,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -186,6 +194,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -383,6 +409,12 @@ class UpdateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -394,6 +426,22 @@ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class UpdateParamsLoginPage(TypedDict): enabled: bool """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 66bbac645..d4fe136d1 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -348,6 +348,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -383,6 +384,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -406,16 +409,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -847,6 +853,22 @@ class Ideal(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KakaoPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Klarna(StripeObject): setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] @@ -877,6 +899,22 @@ class Konbini(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class KrCard(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class Link(StripeObject): setup_future_usage: Optional[Literal["none", "off_session"]] """ @@ -913,6 +951,12 @@ class Multibanco(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class NaverPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Oxxo(StripeObject): expires_after_days: int """ @@ -941,6 +985,12 @@ class P24(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class Payco(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Paynow(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -995,6 +1045,12 @@ class RevolutPay(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class SamsungPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class SepaDebit(StripeObject): setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] @@ -1101,17 +1157,22 @@ class Filters(StripeObject): giropay: Optional[Giropay] grabpay: Optional[Grabpay] ideal: Optional[Ideal] + kakao_pay: Optional[KakaoPay] klarna: Optional[Klarna] konbini: Optional[Konbini] + kr_card: Optional[KrCard] link: Optional[Link] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] + naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] + samsung_pay: Optional[SamsungPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] @@ -1134,17 +1195,22 @@ class Filters(StripeObject): "giropay": Giropay, "grabpay": Grabpay, "ideal": Ideal, + "kakao_pay": KakaoPay, "klarna": Klarna, "konbini": Konbini, + "kr_card": KrCard, "link": Link, "mobilepay": Mobilepay, "multibanco": Multibanco, + "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "payco": Payco, "paynow": Paynow, "paypal": Paypal, "pix": Pix, "revolut_pay": RevolutPay, + "samsung_pay": SamsungPay, "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, @@ -1828,6 +1894,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -1842,18 +1909,23 @@ class CreateParams(RequestOptions): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -2589,6 +2661,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Ideal payment method options. """ + kakao_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ klarna: NotRequired["Session.CreateParamsPaymentMethodOptionsKlarna"] """ contains details about the Klarna payment method options. @@ -2597,6 +2675,10 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Konbini payment method options. """ + kr_card: NotRequired["Session.CreateParamsPaymentMethodOptionsKrCard"] + """ + contains details about the Korean card payment method options. + """ link: NotRequired["Session.CreateParamsPaymentMethodOptionsLink"] """ contains details about the Link payment method options. @@ -2613,6 +2695,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] """ contains details about the OXXO payment method options. @@ -2621,6 +2709,10 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the P24 payment method options. """ + payco: NotRequired["Session.CreateParamsPaymentMethodOptionsPayco"] + """ + contains details about the PAYCO payment method options. + """ paynow: NotRequired["Session.CreateParamsPaymentMethodOptionsPaynow"] """ contains details about the PayNow payment method options. @@ -2639,6 +2731,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the RevolutPay payment method options. """ + samsung_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -3007,6 +3105,18 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3035,6 +3145,18 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): setup_future_usage: NotRequired[Literal["none", "off_session"]] """ @@ -3071,6 +3193,18 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -3103,6 +3237,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3189,6 +3326,9 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 82d78f1be..c83951d3f 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -226,6 +226,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -240,18 +241,23 @@ class CreateParams(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -1017,6 +1023,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Ideal payment method options. """ + kakao_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ klarna: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsKlarna" ] @@ -1029,6 +1041,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Konbini payment method options. """ + kr_card: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsKrCard" + ] + """ + contains details about the Korean card payment method options. + """ link: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsLink" ] @@ -1047,6 +1065,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Multibanco payment method options. """ + naver_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsNaverPay" + ] + """ + contains details about the Kakao Pay payment method options. + """ oxxo: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsOxxo" ] @@ -1057,6 +1081,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the P24 payment method options. """ + payco: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsPayco" + ] + """ + contains details about the PAYCO payment method options. + """ paynow: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsPaynow" ] @@ -1079,6 +1109,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the RevolutPay payment method options. """ + samsung_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + contains details about the Samsung Pay payment method options. + """ sepa_debit: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsSepaDebit" ] @@ -1451,6 +1487,18 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1479,6 +1527,18 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): setup_future_usage: NotRequired[Literal["none", "off_session"]] """ @@ -1515,6 +1575,18 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired[int] """ @@ -1547,6 +1619,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayco(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1633,6 +1708,9 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] diff --git a/stripe/forwarding/_request.py b/stripe/forwarding/_request.py index f371f380c..4fa54e14f 100644 --- a/stripe/forwarding/_request.py +++ b/stripe/forwarding/_request.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, Dict, List, Optional, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack @@ -98,6 +98,10 @@ class CreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/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`. + """ payment_method: str """ The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. @@ -197,6 +201,10 @@ class RetrieveParams(RequestOptions): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["forwarding.request"] """ String representing the object's type. Objects of the same type share the same value. diff --git a/stripe/forwarding/_request_service.py b/stripe/forwarding/_request_service.py index b9049a234..7b95f680d 100644 --- a/stripe/forwarding/_request_service.py +++ b/stripe/forwarding/_request_service.py @@ -5,7 +5,7 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.forwarding._request import Request -from typing import List, cast +from typing import Dict, List, cast from typing_extensions import Literal, NotRequired, TypedDict @@ -15,6 +15,10 @@ class CreateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/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`. + """ payment_method: str """ The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 37dc34817..f87a51c09 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -1211,7 +1211,7 @@ class CreateParams(RequestOptions): """ second_line: NotRequired["Literal['']|str"] """ - The second line to print on the card. + The second line to print on the card. Max length: 24 characters. """ shipping: NotRequired["Card.CreateParamsShipping"] """ @@ -3410,6 +3410,12 @@ class ShipCardParams(RequestOptions): Specifies which fields in the response should be expanded. """ + class SubmitCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + brand: str """ The brand of the card. @@ -4069,6 +4075,116 @@ async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_submit_card( + cls, card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + cls._static_request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card) + ), + params=params, + ), + ) + + @overload + @staticmethod + def submit_card( + card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @overload + def submit_card( + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @class_method_variant("_cls_submit_card") + def submit_card( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + self.resource._request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_submit_card_async( + cls, card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + await cls._static_request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def submit_card_async( + card: str, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @overload + async def submit_card_async( + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + ... + + @class_method_variant("_cls_submit_card_async") + async def submit_card_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Card.SubmitCardParams"] + ) -> "Card": + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + "Card", + await self.resource._request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + @property def test_helpers(self): return self.TestHelpers(self) diff --git a/stripe/issuing/_card_service.py b/stripe/issuing/_card_service.py index 3a0dcb9ff..06c07db93 100644 --- a/stripe/issuing/_card_service.py +++ b/stripe/issuing/_card_service.py @@ -48,7 +48,7 @@ class CreateParams(TypedDict): """ second_line: NotRequired["Literal['']|str"] """ - The second line to print on the card. + The second line to print on the card. Max length: 24 characters. """ shipping: NotRequired["CardService.CreateParamsShipping"] """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 07f6d8442..1e5f051eb 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -66,6 +66,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -101,6 +102,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -124,16 +127,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -235,6 +241,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -313,14 +320,32 @@ class TaxRateDetails(StripeObject): class TaxBreakdown(StripeObject): class TaxRateDetails(StripeObject): + class FlatAmount(StripeObject): + amount: int + """ + Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + currency: str + """ + Three-letter ISO currency code, in lowercase. + """ + country: Optional[str] """ Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ + flat_amount: Optional[FlatAmount] + """ + The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + """ percentage_decimal: str """ The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. """ + rate_type: Optional[Literal["flat_amount", "percentage"]] + """ + Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + """ state: Optional[str] """ State, county, province, or region. @@ -336,6 +361,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", @@ -344,6 +370,7 @@ class TaxRateDetails(StripeObject): """ The tax type, such as `vat` or `sales_tax`. """ + _inner_class_types = {"flat_amount": FlatAmount} amount: int """ @@ -482,6 +509,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -517,6 +545,8 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -540,15 +570,18 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index 376dd7a36..17f903b36 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -48,6 +48,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index cc367fc97..fbe7ec2ab 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -122,6 +122,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -157,6 +158,8 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -180,15 +183,18 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 43bcb69a7..f779ceb69 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -87,6 +87,12 @@ class Bh(StripeObject): Type of registration in `country`. """ + class By(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Ca(StripeObject): class ProvinceStandard(StripeObject): province: str @@ -119,6 +125,12 @@ class Co(StripeObject): Type of registration in `country`. """ + class Cr(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Cy(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -175,6 +187,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ec(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Ee(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -397,6 +415,18 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ma(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + + class Md(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Mt(StripeObject): class Standard(StripeObject): place_of_supply_scheme: Literal["small_seller", "standard"] @@ -503,6 +533,18 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Rs(StripeObject): + type: Literal["standard"] + """ + Type of registration in `country`. + """ + + class Ru(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Sa(StripeObject): type: Literal["simplified"] """ @@ -569,6 +611,12 @@ class Tr(StripeObject): Type of registration in `country`. """ + class Tz(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Us(StripeObject): class LocalAmusementTax(StripeObject): jurisdiction: str @@ -614,6 +662,7 @@ class Election(StripeObject): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -625,6 +674,12 @@ class Election(StripeObject): "state_sales_tax": StateSalesTax, } + class Uz(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Vn(StripeObject): type: Literal["simplified"] """ @@ -643,14 +698,17 @@ class Za(StripeObject): be: Optional[Be] bg: Optional[Bg] bh: Optional[Bh] + by: Optional[By] ca: Optional[Ca] ch: Optional[Ch] cl: Optional[Cl] co: Optional[Co] + cr: Optional[Cr] cy: Optional[Cy] cz: Optional[Cz] de: Optional[De] dk: Optional[Dk] + ec: Optional[Ec] ee: Optional[Ee] eg: Optional[Eg] es: Optional[Es] @@ -672,6 +730,8 @@ class Za(StripeObject): lt: Optional[Lt] lu: Optional[Lu] lv: Optional[Lv] + ma: Optional[Ma] + md: Optional[Md] mt: Optional[Mt] mx: Optional[Mx] my: Optional[My] @@ -683,6 +743,8 @@ class Za(StripeObject): pl: Optional[Pl] pt: Optional[Pt] ro: Optional[Ro] + rs: Optional[Rs] + ru: Optional[Ru] sa: Optional[Sa] se: Optional[Se] sg: Optional[Sg] @@ -690,7 +752,9 @@ class Za(StripeObject): sk: Optional[Sk] th: Optional[Th] tr: Optional[Tr] + tz: Optional[Tz] us: Optional[Us] + uz: Optional[Uz] vn: Optional[Vn] za: Optional[Za] _inner_class_types = { @@ -700,14 +764,17 @@ class Za(StripeObject): "be": Be, "bg": Bg, "bh": Bh, + "by": By, "ca": Ca, "ch": Ch, "cl": Cl, "co": Co, + "cr": Cr, "cy": Cy, "cz": Cz, "de": De, "dk": Dk, + "ec": Ec, "ee": Ee, "eg": Eg, "es": Es, @@ -729,6 +796,8 @@ class Za(StripeObject): "lt": Lt, "lu": Lu, "lv": Lv, + "ma": Ma, + "md": Md, "mt": Mt, "mx": Mx, "my": My, @@ -740,6 +809,8 @@ class Za(StripeObject): "pl": Pl, "pt": Pt, "ro": Ro, + "rs": Rs, + "ru": Ru, "sa": Sa, "se": Se, "sg": Sg, @@ -747,7 +818,9 @@ class Za(StripeObject): "sk": Sk, "th": Th, "tr": Tr, + "tz": Tz, "us": Us, + "uz": Uz, "vn": Vn, "za": Za, } @@ -805,6 +878,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in BH. """ + by: NotRequired["Registration.CreateParamsCountryOptionsBy"] + """ + Options for the registration in BY. + """ ca: NotRequired["Registration.CreateParamsCountryOptionsCa"] """ Options for the registration in CA. @@ -821,6 +898,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in CO. """ + cr: NotRequired["Registration.CreateParamsCountryOptionsCr"] + """ + Options for the registration in CR. + """ cy: NotRequired["Registration.CreateParamsCountryOptionsCy"] """ Options for the registration in CY. @@ -837,6 +918,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in DK. """ + ec: NotRequired["Registration.CreateParamsCountryOptionsEc"] + """ + Options for the registration in EC. + """ ee: NotRequired["Registration.CreateParamsCountryOptionsEe"] """ Options for the registration in EE. @@ -917,6 +1002,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in LV. """ + ma: NotRequired["Registration.CreateParamsCountryOptionsMa"] + """ + Options for the registration in MA. + """ + md: NotRequired["Registration.CreateParamsCountryOptionsMd"] + """ + Options for the registration in MD. + """ mt: NotRequired["Registration.CreateParamsCountryOptionsMt"] """ Options for the registration in MT. @@ -961,6 +1054,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in RO. """ + rs: NotRequired["Registration.CreateParamsCountryOptionsRs"] + """ + Options for the registration in RS. + """ + ru: NotRequired["Registration.CreateParamsCountryOptionsRu"] + """ + Options for the registration in RU. + """ sa: NotRequired["Registration.CreateParamsCountryOptionsSa"] """ Options for the registration in SA. @@ -989,10 +1090,18 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TR. """ + tz: NotRequired["Registration.CreateParamsCountryOptionsTz"] + """ + Options for the registration in TZ. + """ us: NotRequired["Registration.CreateParamsCountryOptionsUs"] """ Options for the registration in US. """ + uz: NotRequired["Registration.CreateParamsCountryOptionsUz"] + """ + Options for the registration in UZ. + """ vn: NotRequired["Registration.CreateParamsCountryOptionsVn"] """ Options for the registration in VN. @@ -1074,6 +1183,12 @@ class CreateParamsCountryOptionsBh(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsBy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCa(TypedDict): province_standard: NotRequired[ "Registration.CreateParamsCountryOptionsCaProvinceStandard" @@ -1110,6 +1225,12 @@ class CreateParamsCountryOptionsCo(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsCr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCy(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsCyStandard" @@ -1182,6 +1303,12 @@ class CreateParamsCountryOptionsDkStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsEc(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsEe(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsEeStandard" @@ -1452,6 +1579,18 @@ class CreateParamsCountryOptionsLvStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsMa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsMd(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsMt(TypedDict): standard: NotRequired[ "Registration.CreateParamsCountryOptionsMtStandard" @@ -1578,6 +1717,18 @@ class CreateParamsCountryOptionsRoStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsRs(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsRu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsSa(TypedDict): type: Literal["simplified"] """ @@ -1656,6 +1807,12 @@ class CreateParamsCountryOptionsTr(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsTz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUs(TypedDict): local_amusement_tax: NotRequired[ "Registration.CreateParamsCountryOptionsUsLocalAmusementTax" @@ -1683,6 +1840,7 @@ class CreateParamsCountryOptionsUs(TypedDict): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -1723,6 +1881,12 @@ class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): The type of the election for the state sales tax registration. """ + class CreateParamsCountryOptionsUz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index fd7ccda89..86c979db5 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -66,6 +66,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in BH. """ + by: NotRequired["RegistrationService.CreateParamsCountryOptionsBy"] + """ + Options for the registration in BY. + """ ca: NotRequired["RegistrationService.CreateParamsCountryOptionsCa"] """ Options for the registration in CA. @@ -82,6 +86,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in CO. """ + cr: NotRequired["RegistrationService.CreateParamsCountryOptionsCr"] + """ + Options for the registration in CR. + """ cy: NotRequired["RegistrationService.CreateParamsCountryOptionsCy"] """ Options for the registration in CY. @@ -98,6 +106,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in DK. """ + ec: NotRequired["RegistrationService.CreateParamsCountryOptionsEc"] + """ + Options for the registration in EC. + """ ee: NotRequired["RegistrationService.CreateParamsCountryOptionsEe"] """ Options for the registration in EE. @@ -178,6 +190,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in LV. """ + ma: NotRequired["RegistrationService.CreateParamsCountryOptionsMa"] + """ + Options for the registration in MA. + """ + md: NotRequired["RegistrationService.CreateParamsCountryOptionsMd"] + """ + Options for the registration in MD. + """ mt: NotRequired["RegistrationService.CreateParamsCountryOptionsMt"] """ Options for the registration in MT. @@ -222,6 +242,14 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in RO. """ + rs: NotRequired["RegistrationService.CreateParamsCountryOptionsRs"] + """ + Options for the registration in RS. + """ + ru: NotRequired["RegistrationService.CreateParamsCountryOptionsRu"] + """ + Options for the registration in RU. + """ sa: NotRequired["RegistrationService.CreateParamsCountryOptionsSa"] """ Options for the registration in SA. @@ -250,10 +278,18 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TR. """ + tz: NotRequired["RegistrationService.CreateParamsCountryOptionsTz"] + """ + Options for the registration in TZ. + """ us: NotRequired["RegistrationService.CreateParamsCountryOptionsUs"] """ Options for the registration in US. """ + uz: NotRequired["RegistrationService.CreateParamsCountryOptionsUz"] + """ + Options for the registration in UZ. + """ vn: NotRequired["RegistrationService.CreateParamsCountryOptionsVn"] """ Options for the registration in VN. @@ -335,6 +371,12 @@ class CreateParamsCountryOptionsBh(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsBy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCa(TypedDict): province_standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsCaProvinceStandard" @@ -371,6 +413,12 @@ class CreateParamsCountryOptionsCo(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsCr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsCy(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsCyStandard" @@ -443,6 +491,12 @@ class CreateParamsCountryOptionsDkStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsEc(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsEe(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsEeStandard" @@ -713,6 +767,18 @@ class CreateParamsCountryOptionsLvStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsMa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsMd(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsMt(TypedDict): standard: NotRequired[ "RegistrationService.CreateParamsCountryOptionsMtStandard" @@ -839,6 +905,18 @@ class CreateParamsCountryOptionsRoStandard(TypedDict): Place of supply scheme used in an EU standard registration. """ + class CreateParamsCountryOptionsRs(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + class CreateParamsCountryOptionsRu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsSa(TypedDict): type: Literal["simplified"] """ @@ -917,6 +995,12 @@ class CreateParamsCountryOptionsTr(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsTz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUs(TypedDict): local_amusement_tax: NotRequired[ "RegistrationService.CreateParamsCountryOptionsUsLocalAmusementTax" @@ -944,6 +1028,7 @@ class CreateParamsCountryOptionsUs(TypedDict): "local_amusement_tax", "local_lease_tax", "state_communications_tax", + "state_retail_delivery_fee", "state_sales_tax", ] """ @@ -984,6 +1069,12 @@ class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): The type of the election for the state sales tax registration. """ + class CreateParamsCountryOptionsUz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsVn(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 8711f8d18..3b4a299ba 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -66,6 +66,7 @@ class TaxId(StripeObject): "bo_tin", "br_cnpj", "br_cpf", + "by_tin", "ca_bn", "ca_gst_hst", "ca_pst_bc", @@ -101,6 +102,8 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "ma_vat", + "md_vat", "mx_rfc", "my_frp", "my_itn", @@ -124,16 +127,19 @@ class TaxId(StripeObject): "th_vat", "tr_tin", "tw_vat", + "tz_vat", "ua_vat", "unknown", "us_ein", "uy_ruc", + "uz_tin", + "uz_vat", "ve_rif", "vn_tin", "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -241,6 +247,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "pst", "qst", + "retail_delivery_fee", "rst", "sales_tax", "vat", diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 84a7dda32..9982e73d4 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -219,6 +219,20 @@ class Nzd(StripeObject): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class Pln(StripeObject): + fixed_amounts: Optional[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: Optional[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: Optional[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class Sek(StripeObject): fixed_amounts: Optional[List[int]] """ @@ -272,6 +286,7 @@ class Usd(StripeObject): myr: Optional[Myr] nok: Optional[Nok] nzd: Optional[Nzd] + pln: Optional[Pln] sek: Optional[Sek] sgd: Optional[Sgd] usd: Optional[Usd] @@ -287,6 +302,7 @@ class Usd(StripeObject): "myr": Myr, "nok": Nok, "nzd": Nzd, + "pln": Pln, "sek": Sek, "sgd": Sgd, "usd": Usd, @@ -405,6 +421,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["Configuration.CreateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["Configuration.CreateParamsTippingSek"] """ Tipping configuration for SEK @@ -572,6 +592,20 @@ class CreateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class CreateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class CreateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -760,6 +794,10 @@ class ModifyParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["Configuration.ModifyParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["Configuration.ModifyParamsTippingSek"] """ Tipping configuration for SEK @@ -927,6 +965,20 @@ class ModifyParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class ModifyParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class ModifyParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index a47d12507..ab58a57db 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -127,6 +127,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["ConfigurationService.CreateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["ConfigurationService.CreateParamsTippingSek"] """ Tipping configuration for SEK @@ -294,6 +298,20 @@ class CreateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class CreateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class CreateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -492,6 +510,10 @@ class UpdateParamsTipping(TypedDict): """ Tipping configuration for NZD """ + pln: NotRequired["ConfigurationService.UpdateParamsTippingPln"] + """ + Tipping configuration for PLN + """ sek: NotRequired["ConfigurationService.UpdateParamsTippingSek"] """ Tipping configuration for SEK @@ -659,6 +681,20 @@ class UpdateParamsTippingNzd(TypedDict): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class UpdateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class UpdateParamsTippingSek(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index c52789f0a..d9eceea8e 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -69,6 +69,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ + alma: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataAlma" + ] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ amazon_pay: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataAmazonPay" ] @@ -159,6 +165,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. """ + kakao_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ klarna: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarna" ] @@ -171,6 +183,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. """ + kr_card: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ link: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataLink" ] @@ -193,6 +211,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. """ + naver_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ oxxo: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataOxxo" ] @@ -205,6 +229,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. """ + payco: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataPayco" + ] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ paynow: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataPaynow" ] @@ -241,6 +271,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. """ + samsung_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ sepa_debit: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataSepaDebit" ] @@ -270,6 +306,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "alma", "amazon_pay", "au_becs_debit", "bacs_debit", @@ -283,18 +320,23 @@ class CreateParamsPaymentMethodData(TypedDict): "giropay", "grabpay", "ideal", + "kakao_pay", "klarna", "konbini", + "kr_card", "link", "mobilepay", "multibanco", + "naver_pay", "oxxo", "p24", + "payco", "paynow", "paypal", "pix", "promptpay", "revolut_pay", + "samsung_pay", "sepa_debit", "sofort", "swish", @@ -348,6 +390,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAlma(TypedDict): + pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): pass @@ -533,12 +578,15 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): ] ] """ - The customer's bank. + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. """ class CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass + class CreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarnaDob" @@ -564,6 +612,9 @@ class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): class CreateParamsPaymentMethodDataKonbini(TypedDict): pass + class CreateParamsPaymentMethodDataKrCard(TypedDict): + pass + class CreateParamsPaymentMethodDataLink(TypedDict): pass @@ -573,6 +624,12 @@ class CreateParamsPaymentMethodDataMobilepay(TypedDict): class CreateParamsPaymentMethodDataMultibanco(TypedDict): pass + class CreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -611,6 +668,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayco(TypedDict): + pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): pass @@ -632,6 +692,9 @@ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): class CreateParamsPaymentMethodDataRevolutPay(TypedDict): pass + class CreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str """ diff --git a/stripe/test_helpers/issuing/_card_service.py b/stripe/test_helpers/issuing/_card_service.py index 5add490c4..ede80012f 100644 --- a/stripe/test_helpers/issuing/_card_service.py +++ b/stripe/test_helpers/issuing/_card_service.py @@ -33,6 +33,12 @@ class ShipCardParams(TypedDict): Specifies which fields in the response should be expanded. """ + class SubmitCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + def deliver_card( self, card: str, @@ -208,3 +214,47 @@ async def ship_card_async( options=options, ), ) + + def submit_card( + self, + card: str, + params: "CardService.SubmitCardParams" = {}, + options: RequestOptions = {}, + ) -> Card: + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + Card, + self._request( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def submit_card_async( + self, + card: str, + params: "CardService.SubmitCardParams" = {}, + options: RequestOptions = {}, + ) -> Card: + """ + Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + """ + return cast( + Card, + await self._request_async( + "post", + "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format( + card=sanitize_id(card), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 3afd750e4..f4ba9cc49 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -761,7 +761,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): """ status: Literal["closed", "open"] """ - The enum specifying what state the account is in. + Status of this FinancialAccount. """ status_details: StatusDetails supported_currencies: List[str] diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index d8a2170e1..73418d2cf 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -7,4 +7,5 @@ from stripe.v2._billing_service import BillingService as BillingService from stripe.v2._core_service import CoreService as CoreService from stripe.v2._event import Event as Event +from stripe.v2._event_destination import EventDestination as EventDestination # The end of the section generated from our OpenAPI spec diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py index 96c4a6f2e..f8e6b1dad 100644 --- a/stripe/v2/_core_service.py +++ b/stripe/v2/_core_service.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_service import StripeService +from stripe.v2.core._event_destination_service import EventDestinationService from stripe.v2.core._event_service import EventService class CoreService(StripeService): def __init__(self, requestor): super().__init__(requestor) + self.event_destinations = EventDestinationService(self._requestor) self.events = EventService(self._requestor) diff --git a/stripe/v2/_event_destination.py b/stripe/v2/_event_destination.py new file mode 100644 index 000000000..1490f0c71 --- /dev/null +++ b/stripe/v2/_event_destination.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Dict, List, Optional +from typing_extensions import Literal + + +class EventDestination(StripeObject): + OBJECT_NAME: ClassVar[Literal["v2.core.event_destination"]] = ( + "v2.core.event_destination" + ) + + class StatusDetails(StripeObject): + class Disabled(StripeObject): + reason: Literal["no_aws_event_source_exists", "user"] + """ + Reason event destination has been disabled. + """ + + disabled: Optional[Disabled] + """ + Details about why the event destination has been disabled. + """ + _inner_class_types = {"disabled": Disabled} + + class AmazonEventbridge(StripeObject): + aws_account_id: str + """ + The AWS account ID. + """ + aws_event_source_arn: str + """ + The ARN of the AWS event source. + """ + aws_event_source_status: Literal[ + "active", "deleted", "pending", "unknown" + ] + """ + The state of the AWS event source. + """ + + class WebhookEndpoint(StripeObject): + signing_secret: Optional[str] + """ + The signing secret of the webhook endpoint, only includable on creation. + """ + url: Optional[str] + """ + The URL of the webhook endpoint, includable. + """ + + created: str + """ + Time at which the object was created. + """ + description: str + """ + An optional description of what the event destination is used for. + """ + enabled_events: List[str] + """ + The list of events to enable for this endpoint. + """ + event_payload: Literal["snapshot", "thin"] + """ + Payload type of events being subscribed to. + """ + events_from: Optional[List[Literal["other_accounts", "self"]]] + """ + Where events should be routed from. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[Dict[str, str]] + """ + Metadata. + """ + name: str + """ + Event destination name. + """ + object: Literal["v2.core.event_destination"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + snapshot_api_version: Optional[str] + """ + If using the snapshot event payload, the API version events are rendered as. + """ + status: Literal["disabled", "enabled"] + """ + Status. It can be set to either enabled or disabled. + """ + status_details: Optional[StatusDetails] + """ + Additional information about event destination status. + """ + type: Literal["amazon_eventbridge", "webhook_endpoint"] + """ + Event destination type. + """ + updated: str + """ + Time at which the object was last updated. + """ + amazon_eventbridge: Optional[AmazonEventbridge] + """ + Amazon EventBridge configuration. + """ + webhook_endpoint: Optional[WebhookEndpoint] + """ + Webhook endpoint configuration. + """ + _inner_class_types = { + "status_details": StatusDetails, + "amazon_eventbridge": AmazonEventbridge, + "webhook_endpoint": WebhookEndpoint, + } diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index 5879a6c60..14173e719 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -1,3 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2.core._event_destination_service import ( + EventDestinationService as EventDestinationService, +) from stripe.v2.core._event_service import EventService as EventService diff --git a/stripe/v2/core/_event_destination_service.py b/stripe/v2/core/_event_destination_service.py new file mode 100644 index 000000000..bb888184e --- /dev/null +++ b/stripe/v2/core/_event_destination_service.py @@ -0,0 +1,478 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.v2._event import Event +from stripe.v2._event_destination import EventDestination +from stripe.v2._list_object import ListObject +from typing import Dict, List, Optional, cast +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationService(StripeService): + class CreateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: List[str] + """ + The list of events to enable for this endpoint. + """ + event_payload: Literal["snapshot", "thin"] + """ + Payload type of events being subscribed to. + """ + events_from: NotRequired[List[Literal["other_accounts", "self"]]] + """ + Where events should be routed from. + """ + include: NotRequired[ + List[ + Literal[ + "webhook_endpoint.signing_secret", "webhook_endpoint.url" + ] + ] + ] + """ + Additional fields to include in the response. + """ + metadata: NotRequired[Dict[str, str]] + """ + Metadata. + """ + name: str + """ + Event destination name. + """ + snapshot_api_version: NotRequired[str] + """ + If using the snapshot event payload, the API version events are rendered as. + """ + type: Literal["amazon_eventbridge", "webhook_endpoint"] + """ + Event destination type. + """ + amazon_eventbridge: NotRequired[ + "EventDestinationService.CreateParamsAmazonEventbridge" + ] + """ + Amazon EventBridge configuration. + """ + webhook_endpoint: NotRequired[ + "EventDestinationService.CreateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + class CreateParamsAmazonEventbridge(TypedDict): + aws_account_id: str + """ + The AWS account ID. + """ + aws_region: str + """ + The region of the AWS event source. + """ + + class CreateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ + + class DeleteParams(TypedDict): + pass + + class DisableParams(TypedDict): + pass + + class EnableParams(TypedDict): + pass + + class ListParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + limit: NotRequired[int] + """ + The page size. + """ + page: NotRequired[str] + """ + The requested page. + """ + + class PingParams(TypedDict): + pass + + class RetrieveParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. + """ + + class UpdateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: NotRequired[List[str]] + """ + The list of events to enable for this endpoint. + """ + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Metadata. + """ + name: NotRequired[str] + """ + Event destination name. + """ + webhook_endpoint: NotRequired[ + "EventDestinationService.UpdateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + class UpdateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ + + def create( + self, + params: "EventDestinationService.CreateParams", + options: RequestOptions = {}, + ) -> EventDestination: + """ + Create a new event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "EventDestinationService.CreateParams", + options: RequestOptions = {}, + ) -> EventDestination: + """ + Create a new event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + def delete( + self, + id: str, + params: "EventDestinationService.DeleteParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Delete an event destination. + """ + return cast( + EventDestination, + self._request( + "delete", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def delete_async( + self, + id: str, + params: "EventDestinationService.DeleteParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Delete an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "delete", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def disable( + self, + id: str, + params: "EventDestinationService.DisableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Disable an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}/disable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def disable_async( + self, + id: str, + params: "EventDestinationService.DisableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Disable an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/disable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def enable( + self, + id: str, + params: "EventDestinationService.EnableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Enable an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def enable_async( + self, + id: str, + params: "EventDestinationService.EnableParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Enable an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def list( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + self._request( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + await self._request_async( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + def ping( + self, + id: str, + params: "EventDestinationService.PingParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Send a `ping` event to an event destination. + """ + return cast( + Event, + self._request( + "post", + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def ping_async( + self, + id: str, + params: "EventDestinationService.PingParams" = {}, + options: RequestOptions = {}, + ) -> Event: + """ + Send a `ping` event to an event destination. + """ + return cast( + Event, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: "EventDestinationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Retrieves the details of an event destination. + """ + return cast( + EventDestination, + self._request( + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: "EventDestinationService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Retrieves the details of an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + params: "EventDestinationService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Update the details of an event destination. + """ + return cast( + EventDestination, + self._request( + "post", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + params: "EventDestinationService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> EventDestination: + """ + Update the details of an event destination. + """ + return cast( + EventDestination, + await self._request_async( + "post", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py index 999fe8471..712685824 100644 --- a/stripe/v2/core/_event_service.py +++ b/stripe/v2/core/_event_service.py @@ -21,7 +21,7 @@ class ListParams(TypedDict): """ page: NotRequired[str] """ - The requested page number. + The requested page. """ class RetrieveParams(TypedDict): From 7c3a43d72772643aa69517ac173d77e97aa0d4ce Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 29 Oct 2024 14:17:35 -0700 Subject: [PATCH 33/36] Bump version to 11.2.0 --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89347ffc..74c4b3e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +## 11.2.0 - 2024-10-29 +* [#1411](https://github.com/stripe/stripe-python/pull/1411) Update generated code + * Add support for resource `stripe.v2.EventDestinations` + * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` + * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities` + * Add support for `groups` on parameter class `stripe.Account.CreateParams` and resource `stripe.Account` + * Add support for `disable_stripe_user_authentication` on resource classes `stripe.AccountSession.Components.AccountManagement.Features`, `stripe.AccountSession.Components.AccountOnboarding.Features`, `stripe.AccountSession.Components.Balances.Features`, `stripe.AccountSession.Components.NotificationBanner.Features`, and `stripe.AccountSession.Components.Payouts.Features` and parameter classes `stripe.AccountSession.CreateParamsComponentsAccountManagementFeatures`, `stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeatures`, `stripe.AccountSession.CreateParamsComponentsBalancesFeatures`, `stripe.AccountSession.CreateParamsComponentsNotificationBannerFeatures`, and `stripe.AccountSession.CreateParamsComponentsPayoutsFeatures` + * Add support for `alma` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.Refund.DestinationDetails`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration` + * Add support for `kakao_pay`, `kr_card` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.Mandate.PaymentMethodDetails`, `stripe.PaymentIntent.PaymentMethodOptions`, `stripe.SetupAttempt.PaymentMethodDetails`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `naver_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `payco`, `samsung_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `enhanced_evidence` on resource class `stripe.Dispute.Evidence` and parameter class `stripe.Dispute.ModifyParamsEvidence` + * Add support for `enhanced_eligibility` on resource class `stripe.Dispute.EvidenceDetails` + * Add support for `enhanced_eligibility_types` on resource `stripe.Dispute` + * Add support for `automatically_finalizes_at` on parameter classes `stripe.Invoice.CreateParams` and `stripe.Invoice.ModifyParams` + * Add support for `amazon_pay` on resource `stripe.PaymentMethodDomain` + * Add support for `flat_amount`, `rate_type` on resource `stripe.TaxRate` and resource class `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails` + * Add support for `schedule_at_period_end` on parameter classes `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` and `stripe.billing_portal.Configuration.ModifyParamsFeaturesSubscriptionUpdate` and resource class `stripe.billing_portal.Configuration.Features.SubscriptionUpdate` + * Add support for `metadata` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request` + * Add support for `_cls_submit_card` on resource `stripe.issuing.Card` + * Add support for `submit_card` on resource `stripe.issuing.Card` + * Add support for `by`, `cr`, `ec`, `ma`, `md`, `rs`, `ru`, `tz`, `uz` on resource class `stripe.tax.Registration.CountryOptions` and parameter class `stripe.tax.Registration.CreateParamsCountryOptions` + * Add support for `pln` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping` + * Change type of `business_profile` on `stripe.billing_portal.Configuration.CreateParams` from `Configuration.CreateParamsBusinessProfile` to `NotRequired[Configuration.CreateParamsBusinessProfile]` + * Add support for `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, `uz_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, `stripe.PaymentLink.ModifyParams.payment_method_types`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `samsung_pay` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `auto` on enum `stripe.Customer.ModifyParamsTax.validate_location` + * Add support for `issuing_transaction.purchase_details_receipt_updated`, `refund.failed` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `jp_credit_transfer` on enums `stripe.Invoice.PaymentSettings.payment_method_types`, `stripe.Invoice.CreateParamsPaymentSettings.payment_method_types`, `stripe.Invoice.ModifyParamsPaymentSettings.payment_method_types`, `stripe.Subscription.PaymentSettings.payment_method_types`, `stripe.Subscription.CreateParamsPaymentSettings.payment_method_types`, and `stripe.Subscription.ModifyParamsPaymentSettings.payment_method_types` + * Add support for `retail_delivery_fee` on enums `stripe.Invoice.AddLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.Invoice.UpdateLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.InvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_type`, `stripe.tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.CalculationLineItem.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.TaxRate.tax_type`, `stripe.TaxRate.CreateParams.tax_type`, and `stripe.TaxRate.ModifyParams.tax_type` + * Add support for `state_retail_delivery_fee` on enums `stripe.tax.Registration.CountryOptions.Us.type` and `stripe.tax.Registration.CreateParamsCountryOptionsUs.type` + * Add support for `2024-10-28.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version` + ## 11.1.1 - 2024-10-18 * [#1414](https://github.com/stripe/stripe-python/pull/1414) Deserialize into correct v2 EventData types * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent` diff --git a/VERSION b/VERSION index 668182d21..b85c6c7b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.1 +11.2.0 diff --git a/stripe/_version.py b/stripe/_version.py index 043e1f3c1..00a5f7802 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.1.1" +VERSION = "11.2.0" From 5c185815b7b9684af8d5fb13ef99c5151545ba75 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:42:16 -0700 Subject: [PATCH 34/36] Update changelog with a note on 2024-10-28.acacia API version (#1420) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74c4b3e70..3e1073bdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 11.2.0 - 2024-10-29 -* [#1411](https://github.com/stripe/stripe-python/pull/1411) Update generated code +* [#1411](https://github.com/stripe/stripe-python/pull/1411) This release changes the pinned API version to `2024-10-28.acacia`. * Add support for resource `stripe.v2.EventDestinations` * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities` From 62558c7fa811189e244301b6cd0a9263150c59c4 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:28:07 -0800 Subject: [PATCH 35/36] Update generated code (#1424) * Update generated code for v1341 * Update generated code for v1347 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 60 ++++++- stripe/_account_person_service.py | 12 ++ stripe/_account_session.py | 12 +- stripe/_api_version.py | 2 +- stripe/_charge.py | 10 +- stripe/_confirmation_token.py | 8 +- stripe/_customer.py | 6 +- stripe/_customer_service.py | 3 +- stripe/_customer_tax_id_service.py | 3 +- stripe/_dispute.py | 2 +- stripe/_file.py | 2 + stripe/_file_link.py | 2 +- stripe/_file_link_service.py | 2 +- stripe/_file_service.py | 1 + stripe/_funding_instructions.py | 132 ++++++++++++++ stripe/_invoice.py | 14 +- stripe/_invoice_line_item.py | 1 + stripe/_invoice_line_item_service.py | 1 + stripe/_invoice_service.py | 8 +- stripe/_invoice_upcoming_lines_service.py | 3 +- stripe/_payment_intent.py | 144 +++++++++++++++- stripe/_payment_intent_service.py | 9 +- stripe/_payment_link.py | 16 +- stripe/_payment_link_service.py | 14 +- stripe/_payment_method.py | 8 +- stripe/_payout.py | 17 ++ stripe/_person.py | 4 + stripe/_refund.py | 8 + stripe/_setup_attempt.py | 4 +- stripe/_setup_intent.py | 14 +- stripe/_setup_intent_service.py | 11 +- stripe/_subscription.py | 13 +- stripe/_subscription_service.py | 8 +- stripe/_tax_id.py | 6 +- stripe/_tax_id_service.py | 3 +- stripe/_tax_rate.py | 3 + stripe/_tax_rate_service.py | 2 + stripe/_token.py | 4 + stripe/_token_service.py | 4 + stripe/_webhook_endpoint.py | 1 + stripe/_webhook_endpoint_service.py | 1 + stripe/billing/_credit_balance_summary.py | 2 +- .../_credit_balance_summary_service.py | 2 +- stripe/billing/_credit_grant.py | 63 ++++--- stripe/billing/_credit_grant_service.py | 28 +-- stripe/billing/_meter_event.py | 2 +- stripe/billing/_meter_event_service.py | 2 +- stripe/checkout/_session.py | 126 +++++++++++++- stripe/checkout/_session_service.py | 80 ++++++++- stripe/identity/_verification_report.py | 2 +- stripe/identity/_verification_session.py | 4 +- .../identity/_verification_session_service.py | 2 +- stripe/issuing/_authorization.py | 163 +++++++++++++++++- stripe/issuing/_card.py | 4 +- stripe/issuing/_cardholder.py | 2 +- stripe/tax/_calculation.py | 8 +- stripe/tax/_calculation_line_item.py | 1 + stripe/tax/_calculation_service.py | 3 +- stripe/tax/_transaction.py | 4 +- .../issuing/_authorization_service.py | 64 ++++++- stripe/treasury/_inbound_transfer.py | 2 +- 62 files changed, 992 insertions(+), 152 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c626f7dd8..7ab08411d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1319 \ No newline at end of file +v1347 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index b13e39411..8fa660038 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -798,9 +798,27 @@ class Error(StripeObject): """ Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. """ - disabled_reason: Optional[str] + disabled_reason: Optional[ + Literal[ + "action_required.requested_capabilities", + "listed", + "other", + "platform_paused", + "rejected.fraud", + "rejected.incomplete_verification", + "rejected.listed", + "rejected.other", + "rejected.platform_fraud", + "rejected.platform_other", + "rejected.platform_terms_of_service", + "rejected.terms_of_service", + "requirements.past_due", + "requirements.pending_verification", + "under_review", + ] + ] """ - This is typed as a string for consistency with `requirements.disabled_reason`. + This is typed as an enum for consistency with `requirements.disabled_reason`. """ errors: Optional[List[Error]] """ @@ -954,9 +972,27 @@ class Error(StripeObject): """ Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. """ - disabled_reason: Optional[str] + disabled_reason: Optional[ + Literal[ + "action_required.requested_capabilities", + "listed", + "other", + "platform_paused", + "rejected.fraud", + "rejected.incomplete_verification", + "rejected.listed", + "rejected.other", + "rejected.platform_fraud", + "rejected.platform_other", + "rejected.platform_terms_of_service", + "rejected.terms_of_service", + "requirements.past_due", + "requirements.pending_verification", + "under_review", + ] + ] """ - If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. + If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). """ errors: Optional[List[Error]] """ @@ -3252,6 +3288,10 @@ class CreatePersonParamsRegisteredAddress(TypedDict): """ class CreatePersonParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -3413,6 +3453,10 @@ class ListPersonsParams(RequestOptions): """ class ListPersonsParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ director: NotRequired[bool] """ A filter on the list of people returned based on whether these people are directors of the account's company. @@ -3833,6 +3877,10 @@ class ModifyPersonParamsRegisteredAddress(TypedDict): """ class ModifyPersonParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -3917,6 +3965,10 @@ class PersonsParams(RequestOptions): """ class PersonsParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ director: NotRequired[bool] """ A filter on the list of people returned based on whether these people are directors of the account's company. diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 903d8e370..d19b8e948 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -321,6 +321,10 @@ class CreateParamsRegisteredAddress(TypedDict): """ class CreateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. @@ -412,6 +416,10 @@ class ListParams(TypedDict): """ class ListParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ director: NotRequired[bool] """ A filter on the list of people returned based on whether these people are directors of the account's company. @@ -750,6 +758,10 @@ class UpdateParamsRegisteredAddress(TypedDict): """ class UpdateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. diff --git a/stripe/_account_session.py b/stripe/_account_session.py index eee61b8fb..74229cb25 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack @@ -23,7 +23,7 @@ class AccountSession(CreateableAPIResource["AccountSession"]): class Components(StripeObject): class AccountManagement(StripeObject): class Features(StripeObject): - disable_stripe_user_authentication: Optional[bool] + disable_stripe_user_authentication: bool """ Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. """ @@ -41,7 +41,7 @@ class Features(StripeObject): class AccountOnboarding(StripeObject): class Features(StripeObject): - disable_stripe_user_authentication: Optional[bool] + disable_stripe_user_authentication: bool """ Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. """ @@ -59,7 +59,7 @@ class Features(StripeObject): class Balances(StripeObject): class Features(StripeObject): - disable_stripe_user_authentication: Optional[bool] + disable_stripe_user_authentication: bool """ Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. """ @@ -100,7 +100,7 @@ class Features(StripeObject): class NotificationBanner(StripeObject): class Features(StripeObject): - disable_stripe_user_authentication: Optional[bool] + disable_stripe_user_authentication: bool """ Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. """ @@ -170,7 +170,7 @@ class Features(StripeObject): class Payouts(StripeObject): class Features(StripeObject): - disable_stripe_user_authentication: Optional[bool] + disable_stripe_user_authentication: bool """ Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. """ diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 16c42a5c5..4f7ee9878 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-10-28.acacia" + CURRENT = "2024-11-20.acacia" diff --git a/stripe/_charge.py b/stripe/_charge.py index 3a08da9f8..971bcad33 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -712,7 +712,7 @@ class ShippingAddress(StripeObject): """ brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ capture_before: Optional[int] """ @@ -779,7 +779,7 @@ class ShippingAddress(StripeObject): multicapture: Optional[Multicapture] network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ network_token: Optional[NetworkToken] """ @@ -871,7 +871,7 @@ class Wallet(StripeObject): """ brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ brand_product: Optional[str] """ @@ -937,7 +937,7 @@ class Wallet(StripeObject): """ network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ network_transaction_id: Optional[str] """ @@ -1260,7 +1260,7 @@ class Receipt(StripeObject): """ network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ network_transaction_id: Optional[str] """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 4afa0d288..b3cdc1aca 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -285,7 +285,7 @@ class Wallet(StripeObject): """ brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ brand_product: Optional[str] """ @@ -351,7 +351,7 @@ class Wallet(StripeObject): """ network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ network_transaction_id: Optional[str] """ @@ -630,7 +630,7 @@ class ShippingAddress(StripeObject): brand: str """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ checks: Optional[Checks] """ @@ -733,7 +733,7 @@ class Wallet(StripeObject): brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ brand_product: Optional[str] """ diff --git a/stripe/_customer.py b/stripe/_customer.py index a4a2b108d..7381efdc7 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -558,6 +558,7 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -594,7 +595,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -668,6 +669,7 @@ class CreateTaxIdParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -704,7 +706,7 @@ class CreateTaxIdParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 9caaa851d..472422454 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -320,6 +320,7 @@ class CreateParamsTaxIdDatum(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -356,7 +357,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 6ba3e2efd..15cd2be0b 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -62,6 +62,7 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -98,7 +99,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 22f5c33e1..8021dfb17 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -348,7 +348,7 @@ class AmazonPay(StripeObject): class Card(StripeObject): brand: str """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ case_type: Literal["chargeback", "inquiry"] """ diff --git a/stripe/_file.py b/stripe/_file.py index 7c36c1e5b..c5cc7091d 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -101,6 +101,7 @@ class ListParams(RequestOptions): "dispute_evidence", "document_provider_identity_document", "finance_report_run", + "financial_account_statement", "identity_document", "identity_document_downloadable", "issuing_regulatory_reporting", @@ -176,6 +177,7 @@ class RetrieveParams(RequestOptions): "dispute_evidence", "document_provider_identity_document", "finance_report_run", + "financial_account_statement", "identity_document", "identity_document_downloadable", "issuing_regulatory_reporting", diff --git a/stripe/_file_link.py b/stripe/_file_link.py index 02e1f2168..824af7dce 100644 --- a/stripe/_file_link.py +++ b/stripe/_file_link.py @@ -44,7 +44,7 @@ class CreateParams(RequestOptions): """ file: str """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ metadata: NotRequired["Literal['']|Dict[str, str]"] """ diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index 73e955371..6b9fca0af 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -21,7 +21,7 @@ class CreateParams(TypedDict): """ file: str """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. """ metadata: NotRequired["Literal['']|Dict[str, str]"] """ diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 4c29215c4..ee4f7f26a 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -81,6 +81,7 @@ class ListParams(TypedDict): "dispute_evidence", "document_provider_identity_document", "finance_report_run", + "financial_account_statement", "identity_document", "identity_document_downloadable", "issuing_regulatory_reporting", diff --git a/stripe/_funding_instructions.py b/stripe/_funding_instructions.py index ccab42862..d3ee23e43 100644 --- a/stripe/_funding_instructions.py +++ b/stripe/_funding_instructions.py @@ -21,10 +21,72 @@ class FundingInstructions(StripeObject): class BankTransfer(StripeObject): class FinancialAddress(StripeObject): class Aba(StripeObject): + class AccountHolderAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + class BankAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + account_holder_address: AccountHolderAddress + account_holder_name: str + """ + The account holder name + """ account_number: str """ The ABA account number """ + account_type: str + """ + The account type + """ + bank_address: BankAddress bank_name: str """ The bank name @@ -33,6 +95,10 @@ class Aba(StripeObject): """ The ABA routing number """ + _inner_class_types = { + "account_holder_address": AccountHolderAddress, + "bank_address": BankAddress, + } class Iban(StripeObject): account_holder_name: str @@ -81,10 +147,72 @@ class Spei(StripeObject): """ class Swift(StripeObject): + class AccountHolderAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + class BankAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + account_holder_address: AccountHolderAddress + account_holder_name: str + """ + The account holder name + """ account_number: str """ The account number """ + account_type: str + """ + The account type + """ + bank_address: BankAddress bank_name: str """ The bank name @@ -93,6 +221,10 @@ class Swift(StripeObject): """ The SWIFT code """ + _inner_class_types = { + "account_holder_address": AccountHolderAddress, + "bank_address": BankAddress, + } class Zengin(StripeObject): account_holder_name: Optional[str] diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 8d7d66e0a..d0b52558d 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -257,6 +257,7 @@ class CustomerTaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -294,7 +295,7 @@ class CustomerTaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -1252,6 +1253,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -2134,6 +2136,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -2170,7 +2173,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3990,6 +3993,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -4026,7 +4030,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -5131,6 +5135,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -5167,7 +5172,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -6165,6 +6170,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index f7a943ad8..dccfaaf85 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -322,6 +322,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 62dade07b..f5ba99936 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -219,6 +219,7 @@ class UpdateParamsTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 0e17cf433..4825ff4ba 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -221,6 +221,7 @@ class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -1115,6 +1116,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -1151,7 +1153,7 @@ class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -2340,6 +2342,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -2376,7 +2379,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3382,6 +3385,7 @@ class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 745aa73b2..a4b9338d5 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -323,6 +323,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -359,7 +360,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 482373185..c0bf5a297 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -431,10 +431,72 @@ class QrCode(StripeObject): class DisplayBankTransferInstructions(StripeObject): class FinancialAddress(StripeObject): class Aba(StripeObject): + class AccountHolderAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + class BankAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + account_holder_address: AccountHolderAddress + account_holder_name: str + """ + The account holder name + """ account_number: str """ The ABA account number """ + account_type: str + """ + The account type + """ + bank_address: BankAddress bank_name: str """ The bank name @@ -443,6 +505,10 @@ class Aba(StripeObject): """ The ABA routing number """ + _inner_class_types = { + "account_holder_address": AccountHolderAddress, + "bank_address": BankAddress, + } class Iban(StripeObject): account_holder_name: str @@ -491,10 +557,72 @@ class Spei(StripeObject): """ class Swift(StripeObject): + class AccountHolderAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + class BankAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + account_holder_address: AccountHolderAddress + account_holder_name: str + """ + The account holder name + """ account_number: str """ The account number """ + account_type: str + """ + The account type + """ + bank_address: BankAddress bank_name: str """ The bank name @@ -503,6 +631,10 @@ class Swift(StripeObject): """ The SWIFT code """ + _inner_class_types = { + "account_holder_address": AccountHolderAddress, + "bank_address": BankAddress, + } class Zengin(StripeObject): account_holder_name: Optional[str] @@ -1267,6 +1399,7 @@ class MandateOptions(StripeObject): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -3546,6 +3679,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -4719,7 +4853,7 @@ class CreateParams(RequestOptions): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this PaymentIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. """ payment_method_data: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodData" @@ -4737,7 +4871,7 @@ class CreateParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ radar_options: NotRequired["PaymentIntent.CreateParamsRadarOptions"] """ @@ -6086,6 +6220,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -7317,7 +7452,7 @@ class ModifyParams(RequestOptions): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this PaymentIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. """ payment_method_data: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodData" @@ -8620,6 +8755,7 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -9869,7 +10005,7 @@ class VerifyMicrodepositsParams(RequestOptions): PaymentMethodConfigurationDetails ] """ - Information about the payment method configuration used for this PaymentIntent. + Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. """ payment_method_options: Optional[PaymentMethodOptions] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 8fa22ca1b..b3d7a76b3 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -1494,6 +1494,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -2667,7 +2668,7 @@ class CreateParams(TypedDict): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this PaymentIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. """ payment_method_data: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodData" @@ -2685,7 +2686,7 @@ class CreateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ radar_options: NotRequired[ "PaymentIntentService.CreateParamsRadarOptions" @@ -4064,6 +4065,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -5323,7 +5325,7 @@ class UpdateParams(TypedDict): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this PaymentIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. """ payment_method_data: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodData" @@ -6656,6 +6658,7 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 200e09f7e..69e806528 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -836,7 +836,9 @@ class CreateParams(RequestOptions): """ The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. """ - submit_type: NotRequired[Literal["auto", "book", "donate", "pay"]] + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] """ Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). """ @@ -1473,7 +1475,7 @@ class CreateParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class CreateParamsShippingOption(TypedDict): @@ -1696,6 +1698,12 @@ class ModifyParams(RequestOptions): """ Configuration for collecting the customer's shipping address. """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + """ subscription_data: NotRequired[ "PaymentLink.ModifyParamsSubscriptionData" ] @@ -2273,7 +2281,7 @@ class ModifyParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class ModifyParamsSubscriptionData(TypedDict): @@ -2481,7 +2489,7 @@ class RetrieveParams(RequestOptions): """ The shipping rate options applied to the session. """ - submit_type: Literal["auto", "book", "donate", "pay"] + submit_type: Literal["auto", "book", "donate", "pay", "subscribe"] """ Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. """ diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 0121889d8..a1d592b29 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -179,7 +179,9 @@ class CreateParams(TypedDict): """ The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. """ - submit_type: NotRequired[Literal["auto", "book", "donate", "pay"]] + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] """ Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). """ @@ -826,7 +828,7 @@ class CreateParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class CreateParamsShippingOption(TypedDict): @@ -1039,6 +1041,12 @@ class UpdateParams(TypedDict): """ Configuration for collecting the customer's shipping address. """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + """ subscription_data: NotRequired[ "PaymentLinkService.UpdateParamsSubscriptionData" ] @@ -1624,7 +1632,7 @@ class UpdateParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class UpdateParamsSubscriptionData(TypedDict): diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index bcbc2a95c..17861d3e0 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -242,7 +242,7 @@ class Wallet(StripeObject): """ brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ brand_product: Optional[str] """ @@ -308,7 +308,7 @@ class Wallet(StripeObject): """ network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ network_transaction_id: Optional[str] """ @@ -587,7 +587,7 @@ class ShippingAddress(StripeObject): brand: str """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ checks: Optional[Checks] """ @@ -688,7 +688,7 @@ class Wallet(StripeObject): brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ brand_product: Optional[str] """ diff --git a/stripe/_payout.py b/stripe/_payout.py index 62fbe67ee..852104d23 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -5,6 +5,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, Union, cast, overload @@ -41,6 +42,16 @@ class Payout( OBJECT_NAME: ClassVar[Literal["payout"]] = "payout" + class TraceId(StripeObject): + status: str + """ + Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + """ + value: Optional[str] + """ + The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + """ + class CancelParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -281,6 +292,10 @@ class ReverseParams(RequestOptions): """ Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. """ + trace_id: Optional[TraceId] + """ + A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + """ type: Literal["bank_account", "card"] """ Can be `bank_account` or `card`. @@ -651,3 +666,5 @@ async def reverse_async( # pyright: ignore[reportGeneralTypeIssues] params=params, ), ) + + _inner_class_types = {"trace_id": TraceId} diff --git a/stripe/_person.py b/stripe/_person.py index 315874c14..2b9b5d1ac 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -313,6 +313,10 @@ class RegisteredAddress(StripeObject): """ class Relationship(StripeObject): + authorizer: Optional[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: Optional[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. diff --git a/stripe/_refund.py b/stripe/_refund.py index 7a79cbe89..c95586250 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -61,6 +61,10 @@ class AuBankTransfer(StripeObject): pass class Blik(StripeObject): + network_decline_code: Optional[str] + """ + For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + """ reference: Optional[str] """ The reference assigned to the refund. @@ -192,6 +196,10 @@ class Sofort(StripeObject): pass class Swish(StripeObject): + network_decline_code: Optional[str] + """ + For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + """ reference: Optional[str] """ The reference assigned to the refund. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index f5c5943e9..da290bab4 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -177,7 +177,7 @@ class GooglePay(StripeObject): brand: Optional[str] """ - Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ checks: Optional[Checks] """ @@ -223,7 +223,7 @@ class GooglePay(StripeObject): """ network: Optional[str] """ - Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ three_d_secure: Optional[ThreeDSecure] """ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index e55a0d367..11a77a371 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -526,6 +526,7 @@ class MandateOptions(StripeObject): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1532,6 +1533,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1842,7 +1844,7 @@ class CreateParams(RequestOptions): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this SetupIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntent.CreateParamsPaymentMethodData" @@ -1859,7 +1861,7 @@ class CreateParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, it defaults to ["card"]. + The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ return_url: NotRequired[str] """ @@ -2725,6 +2727,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -3073,7 +3076,7 @@ class ModifyParams(RequestOptions): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this SetupIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodData" @@ -3090,7 +3093,7 @@ class ModifyParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"]. + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ class ModifyParamsPaymentMethodData(TypedDict): @@ -3885,6 +3888,7 @@ class ModifyParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -4246,7 +4250,7 @@ class VerifyMicrodepositsParams(RequestOptions): PaymentMethodConfigurationDetails ] """ - Information about the payment method configuration used for this Setup Intent. + Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. """ payment_method_options: Optional[PaymentMethodOptions] """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 73cfb2e9e..cffbc4818 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -947,6 +947,7 @@ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1257,7 +1258,7 @@ class CreateParams(TypedDict): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this SetupIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodData" @@ -1274,7 +1275,7 @@ class CreateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, it defaults to ["card"]. + The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ return_url: NotRequired[str] """ @@ -2178,6 +2179,7 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -2536,7 +2538,7 @@ class UpdateParams(TypedDict): """ payment_method_configuration: NotRequired[str] """ - The ID of the payment method configuration to use with this SetupIntent. + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodData" @@ -2553,7 +2555,7 @@ class UpdateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"]. + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). """ class UpdateParamsPaymentMethodData(TypedDict): @@ -3386,6 +3388,7 @@ class UpdateParamsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 681c609b3..9cf48a0ee 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -223,6 +223,7 @@ class MandateOptions(StripeObject): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1028,6 +1029,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1431,7 +1433,7 @@ class ModifyParams(RequestOptions): "Literal['']|Subscription.ModifyParamsPauseCollection" ] """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). """ payment_behavior: NotRequired[ Literal[ @@ -1864,6 +1866,7 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -2198,7 +2201,7 @@ class SearchParams(RequestOptions): """ pause_collection: Optional[PauseCollection] """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). """ payment_settings: Optional[PaymentSettings] """ @@ -2241,7 +2244,7 @@ class SearchParams(RequestOptions): A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. - A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). @@ -2643,7 +2646,7 @@ def modify( A trial starts or ends. - In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). + In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). @@ -2680,7 +2683,7 @@ async def modify_async( A trial starts or ends. - In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). + In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index b3160ca51..9c966572a 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -588,6 +588,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1041,7 +1042,7 @@ class UpdateParams(TypedDict): "Literal['']|SubscriptionService.UpdateParamsPauseCollection" ] """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). """ payment_behavior: NotRequired[ Literal[ @@ -1480,6 +1481,7 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): "girocard", "interac", "jcb", + "link", "mastercard", "unionpay", "unknown", @@ -1765,7 +1767,7 @@ def update( A trial starts or ends. - In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). + In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). @@ -1809,7 +1811,7 @@ async def update_async( A trial starts or ends. - In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). + In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 3cf29c0b2..be1de50d7 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -125,6 +125,7 @@ class CreateParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -161,7 +162,7 @@ class CreateParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -302,6 +303,7 @@ class RetrieveParams(RequestOptions): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -339,7 +341,7 @@ class RetrieveParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 1f6cf5c58..43e88187f 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -66,6 +66,7 @@ class CreateParams(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -102,7 +103,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index fa5efcfe8..674aad3ff 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -89,6 +89,7 @@ class CreateParams(RequestOptions): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -191,6 +192,7 @@ class ModifyParams(RequestOptions): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -290,6 +292,7 @@ class RetrieveParams(RequestOptions): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index b8de81f3b..f447346e1 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -65,6 +65,7 @@ class CreateParams(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -173,6 +174,7 @@ class UpdateParams(TypedDict): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] diff --git a/stripe/_token.py b/stripe/_token.py index 03ef8faa1..4e8e7ba7a 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -991,6 +991,10 @@ class CreateParamsPersonRegisteredAddress(TypedDict): """ class CreateParamsPersonRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 30be56d21..2dd639f21 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -970,6 +970,10 @@ class CreateParamsPersonRegisteredAddress(TypedDict): """ class CreateParamsPersonRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ director: NotRequired[bool] """ Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index d6200f448..614ee7c0f 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -136,6 +136,7 @@ class CreateParams(RequestOptions): "2024-06-20", "2024-09-30.acacia", "2024-10-28.acacia", + "2024-11-20.acacia", ] ] """ diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 30bd28342..597e5a698 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -117,6 +117,7 @@ class CreateParams(TypedDict): "2024-06-20", "2024-09-30.acacia", "2024-10-28.acacia", + "2024-11-20.acacia", ] ] """ diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index 03e1a5de3..ade19dcef 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -109,7 +109,7 @@ class RetrieveParamsFilter(TypedDict): class RetrieveParamsFilterApplicabilityScope(TypedDict): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type for which credit grants can apply. We currently only support the `metered` price type. """ balances: List[Balance] diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py index 096de2915..b31f13e46 100644 --- a/stripe/billing/_credit_balance_summary_service.py +++ b/stripe/billing/_credit_balance_summary_service.py @@ -41,7 +41,7 @@ class RetrieveParamsFilter(TypedDict): class RetrieveParamsFilterApplicabilityScope(TypedDict): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type for which credit grants can apply. We currently only support the `metered` price type. """ def retrieve( diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 29a9b52e7..090a172f4 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -31,7 +31,6 @@ class CreditGrant( A credit grant is an API resource that documents the allocation of some billing credits to a customer. Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) - end """ OBJECT_NAME: ClassVar[Literal["billing.credit_grant"]] = ( @@ -63,7 +62,7 @@ class ApplicabilityConfig(StripeObject): class Scope(StripeObject): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ scope: Scope @@ -84,11 +83,11 @@ class CreateParams(RequestOptions): """ customer: str """ - ID of the customer to whom the billing credits should be granted. + ID of the customer to receive the billing credits. """ effective_at: NotRequired[int] """ - The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -96,15 +95,15 @@ class CreateParams(RequestOptions): """ expires_at: NotRequired[int] """ - The time when the billing credits will expire. If not specified, the billing credits will never expire. + The time when the billing credits will expire. If not specified, the billing credits don't expire. """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. """ name: NotRequired[str] """ - A descriptive name shown in dashboard. + A descriptive name shown in the Dashboard. """ class CreateParamsAmount(TypedDict): @@ -136,7 +135,7 @@ class CreateParamsApplicabilityConfig(TypedDict): class CreateParamsApplicabilityConfigScope(TypedDict): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type for which credit grants can apply. We currently only support the `metered` price type. """ class ExpireParams(RequestOptions): @@ -174,11 +173,11 @@ class ModifyParams(RequestOptions): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. + The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. """ class RetrieveParams(RequestOptions): @@ -197,7 +196,7 @@ class VoidGrantParams(RequestOptions): applicability_config: ApplicabilityConfig category: Literal["paid", "promotional"] """ - The category of this credit grant. This is for tracking purposes and will not be displayed to the customer. + The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. """ created: int """ @@ -205,15 +204,15 @@ class VoidGrantParams(RequestOptions): """ customer: ExpandableField["Customer"] """ - ID of the customer to whom the billing credits are granted. + ID of the customer receiving the billing credits. """ effective_at: Optional[int] """ - The time when the billing credits become effective i.e when they are eligible to be used. + The time when the billing credits become effective—when they're eligible for use. """ expires_at: Optional[int] """ - The time when the billing credits will expire. If not present, the billing credits will never expire. + The time when the billing credits expire. If not present, the billing credits don't expire. """ id: str """ @@ -285,7 +284,7 @@ def _cls_expire( cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ return cast( "CreditGrant", @@ -304,7 +303,7 @@ def expire( id: str, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ ... @@ -313,7 +312,7 @@ def expire( self, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ ... @@ -322,7 +321,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ return cast( "CreditGrant", @@ -340,7 +339,7 @@ async def _cls_expire_async( cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ return cast( "CreditGrant", @@ -359,7 +358,7 @@ async def expire_async( id: str, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ ... @@ -368,7 +367,7 @@ async def expire_async( self, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ ... @@ -377,7 +376,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["CreditGrant.ExpireParams"] ) -> "CreditGrant": """ - Expires a credit grant + Expires a credit grant. """ return cast( "CreditGrant", @@ -395,7 +394,7 @@ def list( cls, **params: Unpack["CreditGrant.ListParams"] ) -> ListObject["CreditGrant"]: """ - Retrieve a list of credit grants + Retrieve a list of credit grants. """ result = cls._static_request( "get", @@ -415,7 +414,7 @@ async def list_async( cls, **params: Unpack["CreditGrant.ListParams"] ) -> ListObject["CreditGrant"]: """ - Retrieve a list of credit grants + Retrieve a list of credit grants. """ result = await cls._static_request_async( "get", @@ -491,7 +490,7 @@ def _cls_void_grant( cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ return cast( "CreditGrant", @@ -510,7 +509,7 @@ def void_grant( id: str, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ ... @@ -519,7 +518,7 @@ def void_grant( self, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ ... @@ -528,7 +527,7 @@ def void_grant( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ return cast( "CreditGrant", @@ -546,7 +545,7 @@ async def _cls_void_grant_async( cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ return cast( "CreditGrant", @@ -565,7 +564,7 @@ async def void_grant_async( id: str, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ ... @@ -574,7 +573,7 @@ async def void_grant_async( self, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ ... @@ -583,7 +582,7 @@ async def void_grant_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["CreditGrant.VoidGrantParams"] ) -> "CreditGrant": """ - Voids a credit grant + Voids a credit grant. """ return cast( "CreditGrant", diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index 904df9c2b..54e6f8f3f 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -27,11 +27,11 @@ class CreateParams(TypedDict): """ customer: str """ - ID of the customer to whom the billing credits should be granted. + ID of the customer to receive the billing credits. """ effective_at: NotRequired[int] """ - The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. + The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. """ expand: NotRequired[List[str]] """ @@ -39,15 +39,15 @@ class CreateParams(TypedDict): """ expires_at: NotRequired[int] """ - The time when the billing credits will expire. If not specified, the billing credits will never expire. + The time when the billing credits will expire. If not specified, the billing credits don't expire. """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. """ name: NotRequired[str] """ - A descriptive name shown in dashboard. + A descriptive name shown in the Dashboard. """ class CreateParamsAmount(TypedDict): @@ -79,7 +79,7 @@ class CreateParamsApplicabilityConfig(TypedDict): class CreateParamsApplicabilityConfigScope(TypedDict): price_type: Literal["metered"] """ - The price type to which credit grants can apply to. We currently only support `metered` price type. + The price type for which credit grants can apply. We currently only support the `metered` price type. """ class ExpireParams(TypedDict): @@ -123,11 +123,11 @@ class UpdateParams(TypedDict): """ expires_at: NotRequired["Literal['']|int"] """ - The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. + The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. """ metadata: NotRequired[Dict[str, str]] """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. """ class VoidGrantParams(TypedDict): @@ -142,7 +142,7 @@ def list( options: RequestOptions = {}, ) -> ListObject[CreditGrant]: """ - Retrieve a list of credit grants + Retrieve a list of credit grants. """ return cast( ListObject[CreditGrant], @@ -161,7 +161,7 @@ async def list_async( options: RequestOptions = {}, ) -> ListObject[CreditGrant]: """ - Retrieve a list of credit grants + Retrieve a list of credit grants. """ return cast( ListObject[CreditGrant], @@ -299,7 +299,7 @@ def expire( options: RequestOptions = {}, ) -> CreditGrant: """ - Expires a credit grant + Expires a credit grant. """ return cast( CreditGrant, @@ -321,7 +321,7 @@ async def expire_async( options: RequestOptions = {}, ) -> CreditGrant: """ - Expires a credit grant + Expires a credit grant. """ return cast( CreditGrant, @@ -343,7 +343,7 @@ def void_grant( options: RequestOptions = {}, ) -> CreditGrant: """ - Voids a credit grant + Voids a credit grant. """ return cast( CreditGrant, @@ -365,7 +365,7 @@ async def void_grant_async( options: RequestOptions = {}, ) -> CreditGrant: """ - Voids a credit grant + Voids a credit grant. """ return cast( CreditGrant, diff --git a/stripe/billing/_meter_event.py b/stripe/billing/_meter_event.py index 46fc203e6..88731e50e 100644 --- a/stripe/billing/_meter_event.py +++ b/stripe/billing/_meter_event.py @@ -27,7 +27,7 @@ class CreateParams(RequestOptions): """ identifier: NotRequired[str] """ - A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. + A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. """ payload: Dict[str, str] """ diff --git a/stripe/billing/_meter_event_service.py b/stripe/billing/_meter_event_service.py index 53214b534..ce29abd3b 100644 --- a/stripe/billing/_meter_event_service.py +++ b/stripe/billing/_meter_event_service.py @@ -19,7 +19,7 @@ class CreateParams(TypedDict): """ identifier: NotRequired[str] """ - A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. + A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. """ payload: Dict[str, str] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index d4fe136d1..60de97cca 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -56,6 +56,12 @@ class Session( OBJECT_NAME: ClassVar[Literal["checkout.session"]] = "checkout.session" + class AdaptivePricing(StripeObject): + enabled: bool + """ + Whether Adaptive Pricing is enabled. + """ + class AfterExpiration(StripeObject): class Recovery(StripeObject): allow_promotion_codes: bool @@ -384,6 +390,7 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -421,7 +428,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: Optional[str] """ @@ -646,6 +653,10 @@ class AuBecsDebit(StripeObject): """ class BacsDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] ] @@ -658,6 +669,7 @@ class BacsDebit(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): setup_future_usage: Optional[Literal["none"]] @@ -697,6 +709,26 @@ class Installments(StripeObject): """ installments: Optional[Installments] + request_extended_authorization: Optional[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. + """ + request_incremental_authorization: Optional[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. + """ + request_multicapture: Optional[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. + """ + request_overcapture: Optional[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. + """ request_three_d_secure: Literal["any", "automatic", "challenge"] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1052,6 +1084,10 @@ class SamsungPay(StripeObject): """ class SepaDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] ] @@ -1064,6 +1100,7 @@ class SepaDebit(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class Sofort(StripeObject): setup_future_usage: Optional[Literal["none"]] @@ -1692,6 +1729,10 @@ class Tax(StripeObject): _inner_class_types = {"breakdown": Breakdown} class CreateParams(RequestOptions): + adaptive_pricing: NotRequired["Session.CreateParamsAdaptivePricing"] + """ + Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + """ after_expiration: NotRequired["Session.CreateParamsAfterExpiration"] """ Configure actions after a Checkout Session has expired. @@ -1992,7 +2033,9 @@ class CreateParams(RequestOptions): """ The shipping rate options to apply to this Session. Up to a maximum of 5. """ - submit_type: NotRequired[Literal["auto", "book", "donate", "pay"]] + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] """ Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be @@ -2019,6 +2062,12 @@ class CreateParams(RequestOptions): The UI mode of the Session. Defaults to `hosted`. """ + class CreateParamsAdaptivePricing(TypedDict): + enabled: NotRequired[bool] + """ + Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + """ + class CreateParamsAfterExpiration(TypedDict): recovery: NotRequired["Session.CreateParamsAfterExpirationRecovery"] """ @@ -2699,7 +2748,7 @@ class CreateParamsPaymentMethodOptions(TypedDict): "Session.CreateParamsPaymentMethodOptionsNaverPay" ] """ - contains details about the Kakao Pay payment method options. + contains details about the Naver Pay payment method options. """ oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] """ @@ -2881,6 +2930,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] ] @@ -2894,6 +2949,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -2931,6 +2989,26 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ Installment options for card payments """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. + """ request_three_d_secure: NotRequired[ Literal["any", "automatic", "challenge"] ] @@ -3106,6 +3184,10 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3146,6 +3228,10 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3194,6 +3280,10 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3238,7 +3328,10 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ class CreateParamsPaymentMethodOptionsPayco(TypedDict): - pass + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] @@ -3327,9 +3420,18 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - pass + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] ] @@ -3343,6 +3445,9 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSofort(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3701,7 +3806,7 @@ class CreateParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class CreateParamsShippingOption(TypedDict): @@ -4050,6 +4155,10 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ + adaptive_pricing: Optional[AdaptivePricing] + """ + Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + """ after_expiration: Optional[AfterExpiration] """ When set, provides configuration for actions to take if this Checkout Session expires. @@ -4291,7 +4400,9 @@ class RetrieveParams(RequestOptions): """ The status of the Checkout Session, one of `open`, `complete`, or `expired`. """ - submit_type: Optional[Literal["auto", "book", "donate", "pay"]] + submit_type: Optional[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] """ Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be @@ -4682,6 +4793,7 @@ async def retrieve_async( return instance _inner_class_types = { + "adaptive_pricing": AdaptivePricing, "after_expiration": AfterExpiration, "automatic_tax": AutomaticTax, "consent": Consent, diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index c83951d3f..1d9abf9f3 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -16,6 +16,12 @@ def __init__(self, requestor): self.line_items = SessionLineItemService(self._requestor) class CreateParams(TypedDict): + adaptive_pricing: NotRequired[ + "SessionService.CreateParamsAdaptivePricing" + ] + """ + Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + """ after_expiration: NotRequired[ "SessionService.CreateParamsAfterExpiration" ] @@ -326,7 +332,9 @@ class CreateParams(TypedDict): """ The shipping rate options to apply to this Session. Up to a maximum of 5. """ - submit_type: NotRequired[Literal["auto", "book", "donate", "pay"]] + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] """ Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be @@ -357,6 +365,12 @@ class CreateParams(TypedDict): The UI mode of the Session. Defaults to `hosted`. """ + class CreateParamsAdaptivePricing(TypedDict): + enabled: NotRequired[bool] + """ + Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + """ + class CreateParamsAfterExpiration(TypedDict): recovery: NotRequired[ "SessionService.CreateParamsAfterExpirationRecovery" @@ -1069,7 +1083,7 @@ class CreateParamsPaymentMethodOptions(TypedDict): "SessionService.CreateParamsPaymentMethodOptionsNaverPay" ] """ - contains details about the Kakao Pay payment method options. + contains details about the Naver Pay payment method options. """ oxxo: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsOxxo" @@ -1263,6 +1277,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] ] @@ -1276,6 +1296,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1313,6 +1336,26 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict): """ Installment options for card payments """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. + """ request_three_d_secure: NotRequired[ Literal["any", "automatic", "challenge"] ] @@ -1488,6 +1531,10 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): """ class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1528,6 +1575,10 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): """ class CreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1576,6 +1627,10 @@ class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): """ class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1620,7 +1675,10 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): """ class CreateParamsPaymentMethodOptionsPayco(TypedDict): - pass + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ class CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired[Literal["none"]] @@ -1709,9 +1767,18 @@ class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): """ class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - pass + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ Literal["none", "off_session", "on_session"] ] @@ -1725,6 +1792,9 @@ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsSofort(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -2083,7 +2153,7 @@ class CreateParamsShippingAddressCollection(TypedDict): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. """ class CreateParamsShippingOption(TypedDict): diff --git a/stripe/identity/_verification_report.py b/stripe/identity/_verification_report.py index 9846ed5bd..edaafaddf 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -456,7 +456,7 @@ class RetrieveParams(RequestOptions): """ verification_flow: Optional[str] """ - The configuration token of a Verification Flow from the dashboard. + The configuration token of a verification flow from the dashboard. """ verification_session: Optional[str] """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 506924ed9..2029509ff 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -257,7 +257,7 @@ class CreateParams(RequestOptions): """ verification_flow: NotRequired[str] """ - The ID of a Verification Flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. """ class CreateParamsOptions(TypedDict): @@ -489,7 +489,7 @@ class RetrieveParams(RequestOptions): """ verification_flow: Optional[str] """ - The configuration token of a Verification Flow from the dashboard. + The configuration token of a verification flow from the dashboard. """ verified_outputs: Optional[VerifiedOutputs] """ diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index 341b795d6..020d52ef1 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -53,7 +53,7 @@ class CreateParams(TypedDict): """ verification_flow: NotRequired[str] """ - The ID of a Verification Flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. """ class CreateParamsOptions(TypedDict): diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 2fa24ec97..20f1cf604 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -149,6 +149,24 @@ class Tax(StripeObject): "reported_breakdown": ReportedBreakdown, } + class FraudChallenge(StripeObject): + channel: Literal["sms"] + """ + The method by which the fraud challenge was delivered to the cardholder. + """ + status: Literal[ + "expired", "pending", "rejected", "undeliverable", "verified" + ] + """ + The status of the fraud challenge. + """ + undeliverable_reason: Optional[ + Literal["no_phone_number", "unsupported_phone_number"] + ] + """ + If the challenge is not deliverable, the reason why. + """ + class Fuel(StripeObject): industry_product_code: Optional[str] """ @@ -702,7 +720,7 @@ class CaptureParamsPurchaseDetailsReceipt(TypedDict): unit_cost: NotRequired[int] class CreateParams(RequestOptions): - amount: int + amount: NotRequired[int] """ The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ @@ -740,6 +758,14 @@ class CreateParams(RequestOptions): """ If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. """ + merchant_amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + merchant_currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ merchant_data: NotRequired["Authorization.CreateParamsMerchantData"] """ Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. @@ -1542,6 +1568,16 @@ class ModifyParams(RequestOptions): Set of [key-value pairs](https://stripe.com/docs/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`. """ + class RespondParams(RequestOptions): + confirmed: bool + """ + Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + class RetrieveParams(RequestOptions): expand: NotRequired[List[str]] """ @@ -1582,7 +1618,7 @@ class ReverseParams(RequestOptions): """ card: "Card" """ - You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. """ cardholder: Optional[ExpandableField["Cardholder"]] """ @@ -1600,6 +1636,10 @@ class ReverseParams(RequestOptions): """ Fleet-specific information for authorizations using Fleet cards. """ + fraud_challenges: Optional[List[FraudChallenge]] + """ + Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + """ fuel: Optional[Fuel] """ Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. @@ -1658,6 +1698,10 @@ class ReverseParams(RequestOptions): [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). """ verification_data: VerificationData + verified_by_fraud_challenge: Optional[bool] + """ + Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + """ wallet: Optional[str] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. @@ -2498,6 +2542,120 @@ async def increment_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_respond( + cls, + authorization: str, + **params: Unpack["Authorization.RespondParams"], + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + "Authorization", + cls._static_request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(authorization) + ), + params=params, + ), + ) + + @overload + @staticmethod + def respond( + authorization: str, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + ... + + @overload + def respond( + self, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + ... + + @class_method_variant("_cls_respond") + def respond( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + "Authorization", + self.resource._request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_respond_async( + cls, + authorization: str, + **params: Unpack["Authorization.RespondParams"], + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + "Authorization", + await cls._static_request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(authorization) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def respond_async( + authorization: str, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + ... + + @overload + async def respond_async( + self, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + ... + + @class_method_variant("_cls_respond_async") + async def respond_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["Authorization.RespondParams"] + ) -> "Authorization": + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + "Authorization", + await self.resource._request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(self.resource.get("id")) + ), + params=params, + ), + ) + @classmethod def _cls_reverse( cls, @@ -2619,6 +2777,7 @@ def test_helpers(self): _inner_class_types = { "amount_details": AmountDetails, "fleet": Fleet, + "fraud_challenges": FraudChallenge, "fuel": Fuel, "merchant_data": MerchantData, "network_data": NetworkData, diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index f87a51c09..b806d5eea 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -30,7 +30,7 @@ class Card( UpdateableAPIResource["Card"], ): """ - You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. """ OBJECT_NAME: ClassVar[Literal["issuing.card"]] = "issuing.card" @@ -3428,7 +3428,7 @@ class SubmitCardParams(RequestOptions): """ An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. - Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) """ created: int """ diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 4d5163009..7092c99d0 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -29,7 +29,7 @@ class Cardholder( """ An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. - Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) """ OBJECT_NAME: ClassVar[Literal["issuing.cardholder"]] = "issuing.cardholder" diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 1e5f051eb..5e2759ff7 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -102,6 +102,7 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -139,7 +140,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -244,6 +245,7 @@ class TaxRateDetails(StripeObject): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] """ @@ -364,6 +366,7 @@ class FlatAmount(StripeObject): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] ] @@ -545,6 +548,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -581,7 +585,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index 17f903b36..e0707da44 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -51,6 +51,7 @@ class TaxRateDetails(StripeObject): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] """ diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index fbe7ec2ab..3c26c11c5 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -158,6 +158,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -194,7 +195,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 3b4a299ba..3c363eb13 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -102,6 +102,7 @@ class TaxId(StripeObject): "kr_brn", "kz_bin", "li_uid", + "li_vat", "ma_vat", "md_vat", "mx_rfc", @@ -139,7 +140,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` """ value: str """ @@ -250,6 +251,7 @@ class TaxRateDetails(StripeObject): "retail_delivery_fee", "rst", "sales_tax", + "service_tax", "vat", ] """ diff --git a/stripe/test_helpers/issuing/_authorization_service.py b/stripe/test_helpers/issuing/_authorization_service.py index ff3ed6b0e..4b97801a8 100644 --- a/stripe/test_helpers/issuing/_authorization_service.py +++ b/stripe/test_helpers/issuing/_authorization_service.py @@ -269,7 +269,7 @@ class CaptureParamsPurchaseDetailsReceipt(TypedDict): unit_cost: NotRequired[int] class CreateParams(TypedDict): - amount: int + amount: NotRequired[int] """ The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ @@ -309,6 +309,14 @@ class CreateParams(TypedDict): """ If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. """ + merchant_amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + merchant_currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ merchant_data: NotRequired[ "AuthorizationService.CreateParamsMerchantData" ] @@ -1045,6 +1053,16 @@ class IncrementParams(TypedDict): If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. """ + class RespondParams(TypedDict): + confirmed: bool + """ + Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + class ReverseParams(TypedDict): expand: NotRequired[List[str]] """ @@ -1225,6 +1243,50 @@ async def finalize_amount_async( ), ) + def respond( + self, + authorization: str, + params: "AuthorizationService.RespondParams", + options: RequestOptions = {}, + ) -> Authorization: + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + Authorization, + self._request( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(authorization), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def respond_async( + self, + authorization: str, + params: "AuthorizationService.RespondParams", + options: RequestOptions = {}, + ) -> Authorization: + """ + Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + """ + return cast( + Authorization, + await self._request_async( + "post", + "/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond".format( + authorization=sanitize_id(authorization), + ), + base_address="api", + params=params, + options=options, + ), + ) + def increment( self, authorization: str, diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 5976aa1eb..0a046710b 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -330,7 +330,7 @@ class SucceedParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ - origin_payment_method: str + origin_payment_method: Optional[str] """ The origin payment method to be debited for an InboundTransfer. """ From 82928b03d041e500598c09e78984b8e002b078ed Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 20 Nov 2024 15:32:38 -0800 Subject: [PATCH 36/36] Bump version to 11.3.0 --- CHANGELOG.md | 86 +++++++++++++++++++++++++++++----------------- VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1073bdf..c7295ebb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,42 +1,66 @@ +## 11.3.0 - 2024-11-20 +* [#1424](https://github.com/stripe/stripe-python/pull/1424) This release changes the pinned API version to `2024-11-20.acacia`. + * Add support for `authorizer` on parameter classes `stripe.Account.CreatePersonParamsRelationship`, `stripe.Account.ListPersonsParamsRelationship`, `stripe.Account.ModifyPersonParamsRelationship`, `stripe.Account.PersonsParamsRelationship`, and `stripe.Token.CreateParamsPersonRelationship` and resource class `stripe.Person.Relationship` + * Add support for `account_holder_address`, `account_holder_name`, `account_type` and `bank_address` on resource classes `stripe.FundingInstructions.BankTransfer.FinancialAddress.Aba`, `stripe.FundingInstructions.BankTransfer.FinancialAddress.Swift`, `stripe.PaymentIntent.NextAction.DisplayBankTransferInstructions.FinancialAddress.Aba`, and `stripe.PaymentIntent.NextAction.DisplayBankTransferInstructions.FinancialAddress.Swift` + * Add support for `submit_type` on parameter class `stripe.PaymentLink.ModifyParams` + * Add support for `trace_id` on resource `stripe.Payout` + * Add support for `network_decline_code` on resource classes `stripe.Refund.DestinationDetails.Blik` and `stripe.Refund.DestinationDetails.Swish` + * Add support for `adaptive_pricing` on parameter class `stripe.checkout.Session.CreateParams` and resource `stripe.checkout.Session` + * Add support for `mandate_options` on parameter classes `stripe.checkout.Session.CreateParamsPaymentMethodOptionsBacsDebit` and `stripe.checkout.Session.CreateParamsPaymentMethodOptionsSepaDebit` and resource classes `stripe.checkout.Session.PaymentMethodOptions.BacsDebit` and `stripe.checkout.Session.PaymentMethodOptions.SepaDebit` + * Add support for `request_extended_authorization`, `request_incremental_authorization`, `request_multicapture` and `request_overcapture` on parameter class `stripe.checkout.Session.CreateParamsPaymentMethodOptionsCard` and resource class `stripe.checkout.Session.PaymentMethodOptions.Card` + * Add support for `capture_method` on parameter classes `stripe.checkout.Session.CreateParamsPaymentMethodOptionsKakaoPay`, `stripe.checkout.Session.CreateParamsPaymentMethodOptionsKrCard`, `stripe.checkout.Session.CreateParamsPaymentMethodOptionsNaverPay`, `stripe.checkout.Session.CreateParamsPaymentMethodOptionsPayco`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptionsSamsungPay` + * Add support for `merchant_amount` and `merchant_currency` on parameter class `stripe.issuing.Authorization.CreateParams` + * Add support for `fraud_challenges`, `verified_by_fraud_challenge` and `respond` on resource `stripe.issuing.Authorization` + * Change type of `disabled_reason` on `stripe.Account.FutureRequirements` and `stripe.Account.Requirements` from `str` to `Literal['action_required.requested_capabilities', 'listed', 'other', 'platform_paused', 'rejected.fraud', 'rejected.incomplete_verification', 'rejected.listed', 'rejected.other', 'rejected.platform_fraud', 'rejected.platform_other', 'rejected.platform_terms_of_service', 'rejected.terms_of_service', 'requirements.past_due', 'requirements.pending_verification', 'under_review']` + * Change type of `disable_stripe_user_authentication` on `stripe.AccountSession.Components.AccountManagement.Features`, `stripe.AccountSession.Components.AccountOnboarding.Features`, `stripe.AccountSession.Components.Balances.Features`, `stripe.AccountSession.Components.NotificationBanner.Features`, and `stripe.AccountSession.Components.Payouts.Features` from `Optional[bool]` to `bool` + * Add support for `subscribe` on enums `stripe.checkout.Session.submit_type`, `stripe.checkout.Session.CreateParams.submit_type`, `stripe.PaymentLink.submit_type`, and `stripe.PaymentLink.CreateParams.submit_type` + * Add support for `li_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `financial_account_statement` on enums `stripe.File.purpose` and `stripe.File.ListParams.purpose` + * Add support for `service_tax` on enums `stripe.Invoice.AddLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.Invoice.UpdateLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.InvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_type`, `stripe.tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.CalculationLineItem.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.TaxRate.tax_type`, `stripe.TaxRate.CreateParams.tax_type`, and `stripe.TaxRate.ModifyParams.tax_type` + * Add support for `link` on enums `stripe.PaymentIntent.PaymentMethodOptions.Card.network`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsCard.network`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsCard.network`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.PaymentMethodOptions.Card.network`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.CreateParamsPaymentMethodOptionsCard.network`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptionsCard.network`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.Card.network`, `stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard.network`, and `stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard.network` + * Add support for `2024-11-20.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version` + * Change type of `amount` on `stripe.issuing.Authorization.CreateParams` from `int` to `NotRequired[int]` + * Change type of `origin_payment_method` on `stripe.treasury.InboundTransfer` from `str` to `Optional[str]` + ## 11.2.0 - 2024-10-29 * [#1411](https://github.com/stripe/stripe-python/pull/1411) This release changes the pinned API version to `2024-10-28.acacia`. - * Add support for resource `stripe.v2.EventDestinations` - * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` - * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities` - * Add support for `groups` on parameter class `stripe.Account.CreateParams` and resource `stripe.Account` - * Add support for `disable_stripe_user_authentication` on resource classes `stripe.AccountSession.Components.AccountManagement.Features`, `stripe.AccountSession.Components.AccountOnboarding.Features`, `stripe.AccountSession.Components.Balances.Features`, `stripe.AccountSession.Components.NotificationBanner.Features`, and `stripe.AccountSession.Components.Payouts.Features` and parameter classes `stripe.AccountSession.CreateParamsComponentsAccountManagementFeatures`, `stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeatures`, `stripe.AccountSession.CreateParamsComponentsBalancesFeatures`, `stripe.AccountSession.CreateParamsComponentsNotificationBannerFeatures`, and `stripe.AccountSession.CreateParamsComponentsPayoutsFeatures` - * Add support for `alma` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.Refund.DestinationDetails`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration` - * Add support for `kakao_pay`, `kr_card` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.Mandate.PaymentMethodDetails`, `stripe.PaymentIntent.PaymentMethodOptions`, `stripe.SetupAttempt.PaymentMethodDetails`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` - * Add support for `naver_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` - * Add support for `payco`, `samsung_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` - * Add support for `enhanced_evidence` on resource class `stripe.Dispute.Evidence` and parameter class `stripe.Dispute.ModifyParamsEvidence` - * Add support for `enhanced_eligibility` on resource class `stripe.Dispute.EvidenceDetails` - * Add support for `enhanced_eligibility_types` on resource `stripe.Dispute` - * Add support for `automatically_finalizes_at` on parameter classes `stripe.Invoice.CreateParams` and `stripe.Invoice.ModifyParams` - * Add support for `amazon_pay` on resource `stripe.PaymentMethodDomain` - * Add support for `flat_amount`, `rate_type` on resource `stripe.TaxRate` and resource class `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails` - * Add support for `schedule_at_period_end` on parameter classes `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` and `stripe.billing_portal.Configuration.ModifyParamsFeaturesSubscriptionUpdate` and resource class `stripe.billing_portal.Configuration.Features.SubscriptionUpdate` - * Add support for `metadata` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request` - * Add support for `_cls_submit_card` on resource `stripe.issuing.Card` - * Add support for `submit_card` on resource `stripe.issuing.Card` - * Add support for `by`, `cr`, `ec`, `ma`, `md`, `rs`, `ru`, `tz`, `uz` on resource class `stripe.tax.Registration.CountryOptions` and parameter class `stripe.tax.Registration.CreateParamsCountryOptions` - * Add support for `pln` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping` - * Change type of `business_profile` on `stripe.billing_portal.Configuration.CreateParams` from `Configuration.CreateParamsBusinessProfile` to `NotRequired[Configuration.CreateParamsBusinessProfile]` - * Add support for `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, `uz_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` - * Add support for `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, `stripe.PaymentLink.ModifyParams.payment_method_types`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` - * Add support for `samsung_pay` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` - * Add support for `auto` on enum `stripe.Customer.ModifyParamsTax.validate_location` - * Add support for `issuing_transaction.purchase_details_receipt_updated`, `refund.failed` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` - * Add support for `jp_credit_transfer` on enums `stripe.Invoice.PaymentSettings.payment_method_types`, `stripe.Invoice.CreateParamsPaymentSettings.payment_method_types`, `stripe.Invoice.ModifyParamsPaymentSettings.payment_method_types`, `stripe.Subscription.PaymentSettings.payment_method_types`, `stripe.Subscription.CreateParamsPaymentSettings.payment_method_types`, and `stripe.Subscription.ModifyParamsPaymentSettings.payment_method_types` - * Add support for `retail_delivery_fee` on enums `stripe.Invoice.AddLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.Invoice.UpdateLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.InvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_type`, `stripe.tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.CalculationLineItem.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.TaxRate.tax_type`, `stripe.TaxRate.CreateParams.tax_type`, and `stripe.TaxRate.ModifyParams.tax_type` - * Add support for `state_retail_delivery_fee` on enums `stripe.tax.Registration.CountryOptions.Us.type` and `stripe.tax.Registration.CreateParamsCountryOptionsUs.type` + * Add support for resource `stripe.v2.EventDestinations` + * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` + * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `samsung_pay_payments` on resource class `stripe.Account.Capabilities` and parameter class `stripe.Account.CreateParamsCapabilities` + * Add support for `groups` on parameter class `stripe.Account.CreateParams` and resource `stripe.Account` + * Add support for `disable_stripe_user_authentication` on resource classes `stripe.AccountSession.Components.AccountManagement.Features`, `stripe.AccountSession.Components.AccountOnboarding.Features`, `stripe.AccountSession.Components.Balances.Features`, `stripe.AccountSession.Components.NotificationBanner.Features`, and `stripe.AccountSession.Components.Payouts.Features` and parameter classes `stripe.AccountSession.CreateParamsComponentsAccountManagementFeatures`, `stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeatures`, `stripe.AccountSession.CreateParamsComponentsBalancesFeatures`, `stripe.AccountSession.CreateParamsComponentsNotificationBannerFeatures`, and `stripe.AccountSession.CreateParamsComponentsPayoutsFeatures` + * Add support for `alma` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.Refund.DestinationDetails`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration` + * Add support for `kakao_pay`, `kr_card` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.Mandate.PaymentMethodDetails`, `stripe.PaymentIntent.PaymentMethodOptions`, `stripe.SetupAttempt.PaymentMethodDetails`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `naver_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `payco`, `samsung_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resource `stripe.PaymentMethod` + * Add support for `enhanced_evidence` on resource class `stripe.Dispute.Evidence` and parameter class `stripe.Dispute.ModifyParamsEvidence` + * Add support for `enhanced_eligibility` on resource class `stripe.Dispute.EvidenceDetails` + * Add support for `enhanced_eligibility_types` on resource `stripe.Dispute` + * Add support for `automatically_finalizes_at` on parameter classes `stripe.Invoice.CreateParams` and `stripe.Invoice.ModifyParams` + * Add support for `amazon_pay` on resource `stripe.PaymentMethodDomain` + * Add support for `flat_amount`, `rate_type` on resource `stripe.TaxRate` and resource class `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails` + * Add support for `schedule_at_period_end` on parameter classes `stripe.billing_portal.Configuration.CreateParamsFeaturesSubscriptionUpdate` and `stripe.billing_portal.Configuration.ModifyParamsFeaturesSubscriptionUpdate` and resource class `stripe.billing_portal.Configuration.Features.SubscriptionUpdate` + * Add support for `metadata` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request` + * Add support for `_cls_submit_card` on resource `stripe.issuing.Card` + * Add support for `submit_card` on resource `stripe.issuing.Card` + * Add support for `by`, `cr`, `ec`, `ma`, `md`, `rs`, `ru`, `tz`, `uz` on resource class `stripe.tax.Registration.CountryOptions` and parameter class `stripe.tax.Registration.CreateParamsCountryOptions` + * Add support for `pln` on parameter classes `stripe.terminal.Configuration.CreateParamsTipping` and `stripe.terminal.Configuration.ModifyParamsTipping` and resource class `stripe.terminal.Configuration.Tipping` + * Change type of `business_profile` on `stripe.billing_portal.Configuration.CreateParams` from `Configuration.CreateParamsBusinessProfile` to `NotRequired[Configuration.CreateParamsBusinessProfile]` + * Add support for `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, `uz_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, `stripe.PaymentLink.ModifyParams.payment_method_types`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `samsung_pay` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `auto` on enum `stripe.Customer.ModifyParamsTax.validate_location` + * Add support for `issuing_transaction.purchase_details_receipt_updated`, `refund.failed` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events` + * Add support for `jp_credit_transfer` on enums `stripe.Invoice.PaymentSettings.payment_method_types`, `stripe.Invoice.CreateParamsPaymentSettings.payment_method_types`, `stripe.Invoice.ModifyParamsPaymentSettings.payment_method_types`, `stripe.Subscription.PaymentSettings.payment_method_types`, `stripe.Subscription.CreateParamsPaymentSettings.payment_method_types`, and `stripe.Subscription.ModifyParamsPaymentSettings.payment_method_types` + * Add support for `retail_delivery_fee` on enums `stripe.Invoice.AddLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.Invoice.UpdateLinesParamsLineTaxAmountTaxRateData.tax_type`, `stripe.InvoiceLineItem.ModifyParamsTaxAmountTaxRateData.tax_type`, `stripe.tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Calculation.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.CalculationLineItem.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetails.tax_type`, `stripe.TaxRate.tax_type`, `stripe.TaxRate.CreateParams.tax_type`, and `stripe.TaxRate.ModifyParams.tax_type` + * Add support for `state_retail_delivery_fee` on enums `stripe.tax.Registration.CountryOptions.Us.type` and `stripe.tax.Registration.CreateParamsCountryOptionsUs.type` * Add support for `2024-10-28.acacia` on enum `stripe.WebhookEndpoint.CreateParams.api_version` ## 11.1.1 - 2024-10-18 * [#1414](https://github.com/stripe/stripe-python/pull/1414) Deserialize into correct v2 EventData types * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent` * [#1415](https://github.com/stripe/stripe-python/pull/1415) update object tags for meter-related classes - + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. * [#1412](https://github.com/stripe/stripe-python/pull/1412) Clean up examples diff --git a/VERSION b/VERSION index b85c6c7b0..f628d2eaf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.2.0 +11.3.0 diff --git a/stripe/_version.py b/stripe/_version.py index 00a5f7802..8942c237b 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "11.2.0" +VERSION = "11.3.0"